{"id":20181892,"url":"https://github.com/devteds/multi-stage-docker-build","last_synced_at":"2026-03-07T01:35:22.340Z","repository":{"id":132073125,"uuid":"587460045","full_name":"devteds/multi-stage-docker-build","owner":"devteds","description":"Source code and terminal log related to the short course - https://devteds.com/multi-stage-docker-build","archived":false,"fork":false,"pushed_at":"2023-11-15T06:19:05.000Z","size":1226,"stargazers_count":3,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T05:12:25.586Z","etag":null,"topics":["docker","multi-stage-build","multi-stage-docker","multi-stage-dockerfiles","rails-on-docker","ruby","ruby-on-rails","rubyonrails"],"latest_commit_sha":null,"homepage":"https://devteds.com/multi-stage-docker-build","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","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":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-01-10T20:00:12.000Z","updated_at":"2024-12-23T13:13:31.000Z","dependencies_parsed_at":"2023-11-15T07:27:09.255Z","dependency_job_id":"3447948b-647c-4362-b099-2b48cc808ce7","html_url":"https://github.com/devteds/multi-stage-docker-build","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devteds/multi-stage-docker-build","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devteds%2Fmulti-stage-docker-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devteds%2Fmulti-stage-docker-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devteds%2Fmulti-stage-docker-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devteds%2Fmulti-stage-docker-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devteds","download_url":"https://codeload.github.com/devteds/multi-stage-docker-build/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devteds%2Fmulti-stage-docker-build/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30205212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"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":["docker","multi-stage-build","multi-stage-docker","multi-stage-dockerfiles","rails-on-docker","ruby","ruby-on-rails","rubyonrails"],"created_at":"2024-11-14T02:37:00.414Z","updated_at":"2026-03-07T01:35:22.300Z","avatar_url":"https://github.com/devteds.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multi-Stage Docker Build: How to Build Production-Ready Docker Image\n\nThe source code is for the [short course](https://devteds.com/multi-stage-docker-build)\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\nThis short course, the [Multi-Stage Docker Build](https://devteds.com/multi-stage-docker-build), is for Developers and DevOps engineers that have some basic knowledge of creating Dockerfile and building docker images, wanting to learn creating multi-stage Dockerfile to build production-ready docker images. In this free short course, we will step through,\n\n- Dockerizing an exisitng application (a Rails application)\n- Not too much into the Rails but give a quick walkthrough for Non-Rails developers\n- Build Docker Image (without multi-stage), test and run the container locally\n- A short overview of how the Dockerfile will be structured for multi-stage\n- Transform the Dockerfile with multi-stage for development environment\n- Extend to add more stages and build final, deployable and prod-ready image\n- Using the deployable image, run container locally to test the prod-ready image\n\n[Course video link](https://youtu.be/EkOCLmvwEhc)\n\n[![Course Video Link](./doc/youtube-thumbnail-multi-stage-docker-rails-play.png)](https://devteds.com/multi-stage-docker-build/)\n\nVisit https://devteds.com to watch all the videos and courses on DevOps and Cloud courses.\n\n\n## Terminal Window Log\n\n### Code\n\n```\nmkdir ~/projs\ngit clone https://github.com/devteds/multi-stage-docker-build.git multi-stage-docker-build\ncd multi-stage-docker-build\n```\n\n### Build and Run locally\n\n```\n# Run on local\ndocker-compose build\ndocker-compose up\n\nopen http://localhost:3101/posts\nopen http://localhost:3101/admin\n```\n\n### Build for prod and test\n\n```\n# stop all containers (Ctl + C)\n\ndocker build -t blog-app-prod --target=prod .\n\n# uncomment blog-app-prod service and,\ndocker-compose up blog-app-prod\nopen http://localhost:3102/posts\n```\n\n\n## Tools \u0026 Versions I used\n\n- Ruby 3.1.2\n- Ruby on Rails 7.0.3\n- MySQL 5.7\n- MacOS 12.0.1\n- Docker 20.10.11\n- Docker 1.29.2 (and v2)\n\n## References\n\n- \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevteds%2Fmulti-stage-docker-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevteds%2Fmulti-stage-docker-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevteds%2Fmulti-stage-docker-build/lists"}