{"id":20181886,"url":"https://github.com/devteds/docker-on-aws-apprunner","last_synced_at":"2026-05-10T08:40:52.641Z","repository":{"id":251949351,"uuid":"819964423","full_name":"devteds/docker-on-aws-apprunner","owner":"devteds","description":"This source code is for the short course that does a walkthrough of creating a simple website, dockerize as nginx image, create AWS ECR repository, push the image to ECR and finally deploy it to AppRunner along with creating necessary IAM resources.","archived":false,"fork":false,"pushed_at":"2024-08-16T20:02:30.000Z","size":4028,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T17:24:32.136Z","etag":null,"topics":["apprunner","aws-apprunner","devcontainer","devops","docker","nginx"],"latest_commit_sha":null,"homepage":"https://youtu.be/1BZlUneXLCs","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/devteds.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-06-25T14:25:53.000Z","updated_at":"2024-10-04T19:19:55.000Z","dependencies_parsed_at":"2024-11-14T07:03:51.636Z","dependency_job_id":null,"html_url":"https://github.com/devteds/docker-on-aws-apprunner","commit_stats":null,"previous_names":["devteds/docker-on-aws-apprunner"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devteds%2Fdocker-on-aws-apprunner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devteds%2Fdocker-on-aws-apprunner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devteds%2Fdocker-on-aws-apprunner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devteds%2Fdocker-on-aws-apprunner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devteds","download_url":"https://codeload.github.com/devteds/docker-on-aws-apprunner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241616687,"owners_count":19991543,"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":["apprunner","aws-apprunner","devcontainer","devops","docker","nginx"],"created_at":"2024-11-14T02:36:59.361Z","updated_at":"2026-05-10T08:40:52.610Z","avatar_url":"https://github.com/devteds.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker on AWS AppRunner\n\n[Learn how to deploy](https://youtu.be/1BZlUneXLCs) a simple website to AWS App Runner using Docker and NGINX. This project walks you through the steps, from image creation to deployment.\n\n## Announcement: Course on Kubernetes\n\n\u003e If you want to start deploying your containers to Kubernetes, especially on AWS EKS, [check this course on Kubernetes](https://www.devteds.com/kubernetes-course-aws-eks-terraform) that walkthrough creating Kubernetes cluster on AWS EKS using Terraform and deploying multiple related containers applications to Kubernetes and more. https://www.devteds.com/kubernetes-course-aws-eks-terraform \n\n---\n\n[Course video link](https://youtu.be/1BZlUneXLCs)\n\n[![Course Video Link](./doc/docker-on-aws-apprunner.png)](https://youtu.be/1BZlUneXLCs)\n\nVisit https://devteds.com to watch all the videos and courses on DevOps and Cloud courses.\n\n## Terminal Window Log\n\n### Get the code ready\n\n```\ngit clone \ncd docker-on-aws-apprunner\ncp .devcontainer/devcontainer.example.json  .devcontainer/devcontainer.json\n# Edit .devcontainer/devcontainer.json to update .aws path\n# Edit aws/apprunner-nginx-service.yml and update ECR image repo:tag\n```\n\n## Build \u0026 Open in Container Environment (VSCode DevContainer)\n\nIf you don't use VS-Code and you may either use the devcontainer cli or other container alternatives or you just use the CLIs installed on your host OS.\n\nAnd if you're using DevContainer, `DevContainers: ReBuild \u0026 ReOpen in Container`\n\n## Docker Build: Build website image\n\n```\ncd web\ndocker build -t nginx-website .\n# or\n# docker build --platform linux/amd64 -t nginx-website .\n```\n\n### ECR Repository \u0026 Docker Push\n\n```\naws ecr create-repository --repository-name nginx-ws\ndocker tag nginx-website \u003cAWS_ACCOUNT_ID\u003e.dkr.ecr.\u003cAWS_REGION\u003e.amazonaws.com/nginx-ws:v1\naws ecr get-login-password --region \u003cAWS_REGION\u003e | docker login --username AWS --password-stdin \u003cAWS_ACCOUNT_ID\u003e.dkr.ecr.\u003cAWS_REGION\u003e.amazonaws.com\ndocker push \u003cAWS_ACCOUNT_ID\u003e.dkr.ecr.\u003cAWS_REGION\u003e.amazonaws.com/nginx-ws:v1\n```\n\n## AWS AppRunner\n\nGot to the root of the project folder.\n\n### Create IAM Role \u0026 Policy\n\n```\naws iam create-role --role-name demo-apprunner-role --assume-role-policy-document file://$PWD/aws/trust-policy.json\naws iam create-policy --policy-name demo-apprunner-ecr-policy --policy-document file://$PWD/aws/apprunner-ecr-policy.json\naws iam attach-role-policy --role-name demo-apprunner-role --policy-arn arn:aws:iam:\u003cAWS_ACCOUNT_ID\u003e:poilcy/demo-apprunner-ecr-policy\n```\n\n### Create Nginx Service\n\nUpdate the aws/apprunner-nginx-service.yml for\n\n- `SourceConfiguration \u003e ImageRepository \u003e ImageIdentifier:` `\u003cAWS-ACCOUNT-ID\u003e`, `\u003cAWS-REGION\u003e`\n- `SourceConfiguration \u003e AuthenticationConfiguration \u003e AccessRoleArn:` `\u003cAWS-ACCOUNT-ID\u003e`\n\n```\naws apprunner create-service --cli-input-yaml file://$PWD/aws/apprunner-nginx-service.yml\n```\n\n### Test the Service\n\n```\naws apprunner list-services\n```\n\nUse the `ServiceUrl` from the `aws apprunner list-services` response to hit the app on browser and verify.\n\n\n## All done? Let's clean up\n\n- Delete the App Runner service `aws apprunner delete-service --service-arn \u003cSERIVE_ARN\u003e`\n- Delete the role \u0026 policy\n- Delete the ECR repository\n\n\n## Author\n\n**Chandra Shettigar | Devteds**\n\n- Website: https://devteds.com\n- LinkedIn: https://www.linkedin.com/in/shettigarc\n\n## Tools \u0026 Versions I used\n\n- MacOS, Apple M1 chip\n- Docker 24.0.2, build cb74dfc\n- Docker Compose version v2.18.1\n- VSCode 1.87.2 (Universal)\n- aws-cli/2.16.4 \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevteds%2Fdocker-on-aws-apprunner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevteds%2Fdocker-on-aws-apprunner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevteds%2Fdocker-on-aws-apprunner/lists"}