{"id":27599716,"url":"https://github.com/tandohanthonynwiackah/myddapi","last_synced_at":"2026-05-07T18:35:34.133Z","repository":{"id":116836948,"uuid":"431156405","full_name":"TandohAnthonyNwiAckah/MyDDAPI","owner":"TandohAnthonyNwiAckah","description":"Intro to deploying my Donet Core API with Docker.","archived":false,"fork":false,"pushed_at":"2021-11-24T09:06:53.000Z","size":62,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T15:51:11.529Z","etag":null,"topics":["doc","docker","dockerfile","dotnet"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/repository/docker/tanacom/myddapi","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TandohAnthonyNwiAckah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-11-23T15:36:19.000Z","updated_at":"2021-11-25T12:24:03.000Z","dependencies_parsed_at":"2024-06-23T21:15:09.416Z","dependency_job_id":null,"html_url":"https://github.com/TandohAnthonyNwiAckah/MyDDAPI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TandohAnthonyNwiAckah/MyDDAPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TandohAnthonyNwiAckah%2FMyDDAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TandohAnthonyNwiAckah%2FMyDDAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TandohAnthonyNwiAckah%2FMyDDAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TandohAnthonyNwiAckah%2FMyDDAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TandohAnthonyNwiAckah","download_url":"https://codeload.github.com/TandohAnthonyNwiAckah/MyDDAPI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TandohAnthonyNwiAckah%2FMyDDAPI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32750886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["doc","docker","dockerfile","dotnet"],"created_at":"2025-04-22T15:43:03.958Z","updated_at":"2026-05-07T18:35:34.127Z","avatar_url":"https://github.com/TandohAnthonyNwiAckah.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MY DOTNET CORE DOCKER API (MyDDAPI)\n\nIntro to deploying my Donet Core API with Docker.\n\nDocker is a software platform that allows you to ```build,test and deploy``` applications quickly.\n\n\n## WHY DOCKER ?\n\n- It lets you ship code faster and get a single object that can reliably ````run anywhere````.\n\n- It also occupy less space and very easy to scale up.\n\n\nIt uses ```Client-Server architecture```. Docker packages software into standardized units called ```Containers``` that\nhave everything the software needs to run including libraries,system tools, code and runtime.\n\nDocker Host is the machine running the Docker server.\n\n##  4 MAIN COMPONENETS OF DOCKER\n\n- ```Docker Client and Server```\n\n- ```Docker Images ``` : is a template with instructions which is used for creating Docker Container.\nIt is built using the ```Docker File``` (text file which contains commands for building a Docker Image\n ) and stored  in a Docker Hub or in a repository.\n\n- ```Docker Container```\n\n- ```Docker Registry```  : is an open source server-side service used for hosting and distributing images. The\ndefault registry of docker is called ```DOCKER HUB```.\n\n\n\n##  TOOLS NEEDED FOR THIS PROJECT\n\n- .NET Core SDK  (I’m using 2.2)\n\n- Text Editor or IDE (eg. VS CODE or VS STUDIO)\n\n- Docker\n\n\n## GETTING STARTED.\n\n- Create a globaljson in the root of the project\n\n\u003e ```dotnet new globaljson```\n\n- Select the Dotnet version \"2.2.100\"\n \u003e  ```dotnet -- version``` to see all versions installed\n\n````\n\n{\n  \"sdk\": {\n    \"version\": \"2.2.100\"\n  }\n}\n\n````\n\n- Create new webapi in the same folder containing the globaljson\n\n\u003e   ```dotnet new webapi```\n\n- You can build and run to see the project working.\n\n\u003e  ```dotnet run```\n\n- Access it on locally on \u003chttp://localhost:5000/api/values\u003e to view the api.\n\n- Create Dockerfile if it doesn't exist\n\n- Once the Dockerfile is created,run the command below\n\u003e   ``` docker build -t tanacom/myddapi . ```\n\n\n\u003e Docker Hub ID\\Project Name:Version\n\n\u003e ```tanacom``` here is my Docker Hub ID\n\u003e myddapi is my project name and should always be in ```lowercase```.\n\u003e we omitted the version here.you can should to add it.\n\u003e Place a space and ```period``` after the project name always .\n\nAlso, you don’t have to provide your Docker Hub ID in the name\nbut it’s useful if you’re pushing it up to the ```Docker Hub for deployment```.\n\n- Type the command below to see  your created docker image.\n\u003e ```docker images```\n\n- Once we have our image created, we just run it with the command below.\n\u003e ```docker run -p 8080:80 tanacom/myddapi```\n\nImage should now be running as a ```Container```! The only thing of note is the ```“-p”``` flag – this is a ```port-mapping```,\nin this case it’s saying map ````port 8080 on my PC to port 80 ````of the container.\n\n So to access the api, we need to use port 8080 as follows:\n\n\u003e \u003chttp://localhost:8080/api/values\u003e\n\n- To see all running container, run the below command\n\n\u003e  ```docker ps```\n\n- Install the Docker extension if using VS CODE, you can see running containers and perform tasks on it.\n\n- Run the command below to stop the container in cmd\n \u003e   ```docker stop \u003cCONTAINER ID\u003e```\n\n- Login to Docker Hub if already have account with them.\n \u003e    ```docker login --username=tanacom```\n\n \u003e NB: ```tanacom``` here is my username.\n\n- Once login, run the Docker push command to push to the Docker Hub\n\n\u003e    ```docker push tanacom/myddapi```\n\n\u003e NB: ```myddapi``` here is my project name.\n\n\n- Go to your ```Docker Hub``` to check your project.\n\nGood to go.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftandohanthonynwiackah%2Fmyddapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftandohanthonynwiackah%2Fmyddapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftandohanthonynwiackah%2Fmyddapi/lists"}