AWS Cloud Developer: Containers using Docker Flashcards
Common Deployment Headaches
Organizations often have different development environments. These often include development and production.
Deploying and testing the same code across different environments can be cumbersome
In practice, it’s difficult to keep a development and production environment perfectly synchronized with regards to their versions, operating systems, dependencies, etc.
It is common for code to work in a development environment and not behave as expected in production
A property where a resource is expected to be terminated
Ephemeral
Resources that are required in order to properly run an application
Dependencies
The act of making new software changes available
Deployment
Why should containers be stateless?
Containers are ephemiral and will eventually be destroyed.
Containers
A Container is a unit of eployment. It’s a self-contained application with all the dependencies needed to run
Docker command: Create Docker image
docker build -t
Docker command: Show Docker images:
docker images
Docker command: Run Docker image
docker run
Docker command: Show running Docker containers
docker ps
Docker command: Terminate a Docker container
docker kill
What is a Dockerfile?
A Dockerfile defines the steps to create a Docker Image
Application code uses instructions in a Dockerfile to create a Docker Image which is deployed to Docker Container(s).
Docker
Docker is a platform that helps us manage the process of creating and managing our containers.
Docker Image
When we have an application that we want to deploy, we can package it into a Docker Image. The image contains all of your code and dependencies.
Docker Container
A Docker Container is an ephemeral running instance of a Docker Image.