{"id":23796992,"url":"https://github.com/lukepadiachy/docker-webapp-example","last_synced_at":"2026-04-29T16:02:03.174Z","repository":{"id":269390060,"uuid":"907261067","full_name":"lukepadiachy/docker-webapp-example","owner":"lukepadiachy","description":"This is an example project with docker I built which forms part of another repo titled \"docker-for-beginners\". A simple web app with some pretty designs to make it look less like a template. Have fun :) ","archived":false,"fork":false,"pushed_at":"2024-12-23T08:47:10.000Z","size":1075,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T14:35:43.543Z","etag":null,"topics":["docker","docker-compose","dotnet","dotnet-framework","webapp"],"latest_commit_sha":null,"homepage":"https://github.com/lukepadiachy/docker-for-beginners","language":"HTML","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/lukepadiachy.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}},"created_at":"2024-12-23T07:32:04.000Z","updated_at":"2024-12-23T14:15:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"4af3528b-09b6-4e0d-a1e8-1b9c54383dfc","html_url":"https://github.com/lukepadiachy/docker-webapp-example","commit_stats":null,"previous_names":["lukepadiachy/docker-webapp-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lukepadiachy/docker-webapp-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukepadiachy%2Fdocker-webapp-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukepadiachy%2Fdocker-webapp-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukepadiachy%2Fdocker-webapp-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukepadiachy%2Fdocker-webapp-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukepadiachy","download_url":"https://codeload.github.com/lukepadiachy/docker-webapp-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukepadiachy%2Fdocker-webapp-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32432917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"last_error":"SSL_read: 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":["docker","docker-compose","dotnet","dotnet-framework","webapp"],"created_at":"2025-01-01T20:16:32.195Z","updated_at":"2026-04-29T16:02:03.168Z","avatar_url":"https://github.com/lukepadiachy.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to Containerize a .NET App with Docker With Visual Studio Code\n\n### What You’ll Need\n- **Docker Desktop**: Make sure you’ve installed the latest version.\n- **Git**: You’ll need a Git client. Any client works, but the examples here use the command line.\n\n---\n\n### What’s This About?\nThis guide shows you how to:\n1. Put a .NET app into a Docker container.\n2. Run it !\n\n---\n\n### Step 1: Get the this Sample App\nWe’ll use a ready-made .NET app for this.\n\n1. Open your terminal.\n2. Go to the folder where you want to work.\n3. Clone the app by running this command:\n\n   ```bash\n   git clone https://github.com/docker/docker-webapp-example\n   ```\n\nNow you have a folder called `docker-webapp-example`.\n\n---\n\n### Step 2: Set Up Docker Files\nDocker needs some setup files to containerize your app. Thankfully, Docker makes this easy with the `docker init` command.\n\n1. Go into the `docker-webapp-example` folder, can do this in your IDE too.\n2. Run this in your terminal:\n\n   ```bash\n   docker init\n   ```\n   \n   ![image](https://github.com/user-attachments/assets/f66f20fd-3681-4e9d-ae6b-65140b7b9092)\n\n   \n\n4. Answer a few questions:\n   You will notice a prompt like thing in your terminal , if you click the up and down arrow on your keyboard , this will allow you to select a platform , then hit enter\n   - **Platform**: Pick `ASP.NET Core`.\n   - **Main Project**: Type `docker-webapp-example`.\n   - **.NET Version**: Choose `9.0` or whichever version you have .\n   - **Port**: Use `8080`, this can literally be any port number of your choosing.\n\n   ![image](https://github.com/user-attachments/assets/c483510a-fb35-4505-8593-967993807c4c)\n\n\nWhen done, Docker will create these files for you:\n- `.dockerignore`\n- `Dockerfile`\n- `compose.yaml`\n- `README.Docker.md`\n\n![image](https://github.com/user-attachments/assets/da8bf2a0-999a-4635-87ba-bff4cc7cb0b2)\n\n\nYour folder will now look like this:\n\n```\ndocker-webapp-example/\n├── docker-webapp-example/\n├── .dockerignore\n├── .gitignore\n├── compose.yaml\n├── docker-webapp-example.sln/\n├── Dockerfile\n├── README.Docker.md\n├── README.md\n```\n\n---\n\n### Step 3: Run Your App in Docker\n1. In the `docker-dotnet-sample` folder, run this command:\n\n   ```bash\n   docker compose up --build\n   ```\n   \n    ![image](https://github.com/user-attachments/assets/c11c18cc-9910-4f04-b332-25da4f5bf96d)\n   \n3. Head over to docker desktop and select the port as highlighted below. You’ll see the app running!\n\n   ![image](https://github.com/user-attachments/assets/24297859-5dba-4ec6-b6c3-dd44b13af790)\n\n   ![image](https://github.com/user-attachments/assets/80568a1b-e68c-423e-9479-90eeafbe11a2)\n\n\n   \n5. To stop the app, press `Ctrl+C` in the terminal, maybe twice to stop it in your IDE aswell.\n   \n   ![image](https://github.com/user-attachments/assets/80f33038-b271-4041-893f-606bb46040f7)\n\n---\n\n### Step 4: Run It in the Background (Optional)\nWant the app to keep running even after you close the terminal? Do this:\n\n1. Run:\n   ```bash\n   docker compose up --build -d\n   ```\n2. Check the app at [http://localhost:8080](http://localhost:8080).\n3. To stop the app, run:\n   ```bash\n   docker compose down\n   ```\n\n---\n\n### You Did It!\nYou just learned how to:\n- Containerize a .NET app.\n- Run it with Docker.\n\n### Want to Learn More?\n- [Dockerfile Basics](https://docs.docker.com/engine/reference/builder/)\n- [.dockerignore File](https://docs.docker.com/engine/reference/builder/#dockerignore-file)\n- [Docker Compose Guide](https://docs.docker.com/compose/)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukepadiachy%2Fdocker-webapp-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukepadiachy%2Fdocker-webapp-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukepadiachy%2Fdocker-webapp-example/lists"}