Ready for the real environment experience?
If you're building and deploying cloud native applications and microservices, then understanding container development and orchestration is a must have skill. In this Lab you'll learn how to use both Docker and Docker Compose to build and run containers.
In this Lab scenario you'll work with 2 containers. A NGINX web server container which will be configured to proxy incoming HTTP requests downstream to second container running a customised Python FLASK based web application. The NGINX web server container will use the publicly available nginx:1.13.7 docker image. The FLASK based web application container will be based on a custom docker image that you will need to first create.
This Lab will teach you how to use and define a Dockerfile to build a FLASK based web application, and then use it with the docker build command to build a Docker Image. You'll then learn how to use Docker Compose, a tool for defining and running multi-container Docker applications, to configure and launch the dual container (Nginx -> Flask) environment.
Upon completion of this Lab, you will be able to:
- Edit and update a Dockerfile to create a Flask based web application
- Use the docker build command to build a new Docker Image and tag it with cloudacademydevops/flaskapp:latest
- Edit and update a Docker Compose file to create a dual container (Nginx -> Flask) setup
- Use the docker-compose command to launch a dual container (Nginx -> Flask) setup
- Test and validate the container setup using the curl command
- Be comfortable with basic Linux command line administration
- Be comfortable with basic container concepts
This Lab will start with the following AWS resources provisioned automatically for you:
- A single EC2 instance, named ide.containers.cloudacademy.platform.instance, which will have a public IP address attached. This will be the instance that you will connect to using your local workstation browser.
To achieve the Lab end state, you will be walked through the process of:
- Using your local workstation browser to remotely connect to ide.containers.cloudacademy.platform.instance
- Using the web based IDE and integrated terminal, you'll complete the remainder of the stated Lab Objectives (above)
August 31st, 2021 - Update Dockerfile instruction to ensure the file is saved before attempting to build the image
August 14th, 2020 - Fixed issue preventing Kubernetes environment from starting
Jeremy is a Content Lead Architect and DevOps SME here at Cloud Academy where he specializes in developing DevOps technical training documentation.
He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 25+ years. In recent times, Jeremy has been focused on DevOps, Cloud (AWS, GCP, Azure), Security, Kubernetes, and Machine Learning.
Jeremy holds professional certifications for AWS, GCP, and Kubernetes.