-
Notifications
You must be signed in to change notification settings - Fork 274
08. Docker. Docker compose
Siarhei P edited this page Jun 10, 2024
·
4 revisions
- Select a combination of services (e.g., web app, database) to create a multi-container application.
- Create a Docker Compose YAML file to define the services, networks, and volumes.
- Configure environment variables and dependencies between services.
- Run the application stack using the
docker-compose up
ordocker compose up
command. - Access the application through a web browser or API client.
- Document the Docker Compose file structure and the steps to deploy the application stack.
- Choose a programming language (e.g., Java, Go, Python) and a sample application.
- Write a multi-stage Dockerfile to build the application with different stages for build and runtime.
- Compile or package the application in the build stage.
- Copy the compiled application into the runtime stage and configure it to run.
- Build the multi-stage Docker image and run a container based on it.
- Push/publish image to docker hub and/or github container register.
- Slack notification when build failed/success with image name/tag.
- Document the Dockerfile structure, the build process, and the advantages of multi-stage builds.
Docker compose file and github action file add to folder 08.Docker.Docker-compose
add prepare PR (Pull Request)