AWS Cloud Developer: Containers using Docker Flashcards

1
Q

Common Deployment Headaches

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A property where a resource is expected to be terminated

A

Ephemeral

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Resources that are required in order to properly run an application

A

Dependencies

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The act of making new software changes available

A

Deployment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Why should containers be stateless?

A

Containers are ephemiral and will eventually be destroyed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Containers

A

A Container is a unit of eployment. It’s a self-contained application with all the dependencies needed to run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Docker command: Create Docker image

A

docker build -t

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Docker command: Show Docker images:

A

docker images

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Docker command: Run Docker image

A

docker run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Docker command: Show running Docker containers

A

docker ps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Docker command: Terminate a Docker container

A

docker kill

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a Dockerfile?

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Docker

A

Docker is a platform that helps us manage the process of creating and managing our containers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Docker Image

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Docker Container

A

A Docker Container is an ephemeral running instance of a Docker Image.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Base image

A

A set of common dependencies built into a Docker image that acts as a starting point to build an application’s Docker images to reduce build times

17
Q

Container

A

Grouped software dependencies and packages that make it easier and more reliable to deploy software

18
Q

Container Registry

A

A centralized place to store container images

19
Q

Docker-compose

A

A tool used to run multiple Docker containers at once; often used to specify dependent relationships between containers

20
Q

image

A

A snapshot of dependencies and code used by Docker containers to run an application

21
Q

troubleshooting/debuggin docker

A

docker inspect
docker logs
docker ps

Attach to container:
docker exec -it sh

once inside run the following to see processes :
ps aux

22
Q

System Process

A

A computer program run by the operating system

23
Q

What are some reasons why a container may work in a local environment but not run successfully in a deployed environment?

A

Security restrictions

Not enough system resources

Credentials are different

24
Q

Container Registry

A

A container registry serves as a centralized place for us to store and version our images.

25
Q

DockerHub

A

DockerHub is a popular container registry run by the same organization that created Docker.

26
Q

Base Images

A

Base images reduce time that it takes to run redundant operations.