{"id":20049834,"url":"https://github.com/biplobpustcse/dotnet8webapi-with-docker","last_synced_at":"2026-05-19T19:02:04.820Z","repository":{"id":216550631,"uuid":"741627109","full_name":"biplobpustcse/DotNet8WebAPI-With-Docker","owner":"biplobpustcse","description":"Dot Net 8 Web API","archived":false,"fork":false,"pushed_at":"2024-01-22T02:53:57.000Z","size":14058,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T20:46:34.859Z","etag":null,"topics":["csharp","docker","dotnet8"],"latest_commit_sha":null,"homepage":"","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/biplobpustcse.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-01-10T19:29:24.000Z","updated_at":"2024-01-15T18:41:22.000Z","dependencies_parsed_at":"2024-11-13T12:03:19.903Z","dependency_job_id":null,"html_url":"https://github.com/biplobpustcse/DotNet8WebAPI-With-Docker","commit_stats":null,"previous_names":["biplobpustcse/dotnet8webapi-with-docker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biplobpustcse%2FDotNet8WebAPI-With-Docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biplobpustcse%2FDotNet8WebAPI-With-Docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biplobpustcse%2FDotNet8WebAPI-With-Docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biplobpustcse%2FDotNet8WebAPI-With-Docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/biplobpustcse","download_url":"https://codeload.github.com/biplobpustcse/DotNet8WebAPI-With-Docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241480415,"owners_count":19969644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["csharp","docker","dotnet8"],"created_at":"2024-11-13T11:52:38.970Z","updated_at":"2026-05-19T19:01:59.782Z","avatar_url":"https://github.com/biplobpustcse.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dot Net 8 Web API With Docker\n\n#### Docker File\n\n```\n#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.\n\nFROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base\nUSER app\nWORKDIR /app\nEXPOSE 8080\n\nFROM mcr.microsoft.com/dotnet/sdk:8.0 AS build\nARG BUILD_CONFIGURATION=Release\nWORKDIR /src\nCOPY [\"DotNet8WebAPI/DotNet8WebAPI.csproj\", \"DotNet8WebAPI/\"]\nRUN dotnet restore \"./DotNet8WebAPI/./DotNet8WebAPI.csproj\"\nCOPY . .\nWORKDIR \"/src/DotNet8WebAPI\"\nRUN dotnet build \"./DotNet8WebAPI.csproj\" -c $BUILD_CONFIGURATION -o /app/build\n\nFROM build AS publish\nARG BUILD_CONFIGURATION=Release\nRUN dotnet publish \"./DotNet8WebAPI.csproj\" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false\n\nFROM base AS final\nWORKDIR /app\nCOPY --from=publish /app/publish .\nENTRYPOINT [\"dotnet\", \"DotNet8WebAPI.dll\"]\n```\n\n#### Instead, go to the parent directory, with the .sln file and use the docker -f option to specify the Dockerfile to use in the subfolder:\n#### Create image\n```\ndocker build -t counter-image -f DotNet8WebAPI/Dockerfile .\n```\n#### It worked for me.\n#### Create container\n```\ndocker run -p 4201:8080 --name your-container-name your-image-name\n```\n#### You can run only using Visual stdio terminal\n```\ndocker run -it --rm -p 8080:80 --name weatherapi-container weatherapi-image:latest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiplobpustcse%2Fdotnet8webapi-with-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbiplobpustcse%2Fdotnet8webapi-with-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiplobpustcse%2Fdotnet8webapi-with-docker/lists"}