Docker Flashcards
What type of service are containers and why?
Between LaaS and PaaS
Because we can customize the runtime
What is a daemon?
A background process
What is an image?
A particular runtime configuration
What is a container?
A singular deployment of an image
What is the command to deploy an image?
docker run -d -p 80:80 docker/name
When using docker run what does the -p option mean?
Specifies the internal and external ports of the container
When using docker run what does the -d option mean?
Use daemons
What files do you need to create a Docker image?
Dockerfile
In the Dockerfile what is the FROM command?
Specifies the base image and version to use
In the Dockerfile what is the RUN command?
Run commands during the building of the image
Used for environment configuration
In the Dockerfile what is the COPY command?
Copies files from your local filesystem into the images filesystem
COPY
In the Dockerfile what is the EXPOSE command?
Specifies a port that we want to open
In the Dockerfile what is the CMD command?
Run commands during the container initialization
Dockerfile can only have one CMD statement
What is the command to build an image?
docker build -t alpineapache ../name
What is the command to build an image?
docker build -t “alpineapache ../name”