Docker Essentials Flashcards (copy)

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/25

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards for Docker essentials.

26 Terms

1
New cards

Docker Image

A lightweight, standalone, and executable software package that includes everything needed to run a piece of software, including the code, runtime, libraries, and dependencies.

2
New cards

Docker Container

A runtime instance of a Docker image. It includes the application and its dependencies but runs as an isolated process on the host operating system.

3
New cards

Docker Image vs. Container

An image is a read-only template; a container is a running instance of that image with a writable layer on top.

4
New cards

Dockerfile

A text file that contains a series of instructions to build a Docker image automatically.

5
New cards

Docker Compose

A tool to define and manage multi-container Docker applications using a YAML file to configure application services.

6
New cards

Dockerfile commands

FROM, RUN, CMD, COPY, ADD, ENV, EXPOSE, WORKDIR, ENTRYPOINT

7
New cards

FROM instruction

Specifies the base image from which you start building your image.

8
New cards

RUN instruction

Executes commands in a new layer on top of the current image and commits the results.

9
New cards

CMD instruction

Specifies the default command to run when the container starts.

10
New cards

CMD vs. ENTRYPOINT

CMD provides default arguments for ENTRYPOINT or command, while ENTRYPOINT sets the executable that will run.

11
New cards

Docker build, docker run

Common Docker commands to build and run images

12
New cards

docker ps

Lists running containers

13
New cards

docker stop

Stops a running container

14
New cards

docker rm

Removes a container

15
New cards

docker rmi

Removes an image

16
New cards

docker logs

View logs of a container

17
New cards

Docker Networking

Allows containers to communicate with each other and with the outside world.

18
New cards

Default Docker Network Types

bridge (default), host, none

19
New cards

Bridge Network

A private internal network created by Docker to allow communication between containers on the same host.

20
New cards

-p flag in docker run

Exposes ports using Docker, e.g. -p hostPort:containerPort

21
New cards

Services section in docker-compose.yml

Defines services in Docker Compose

22
New cards

Volumes in Docker Compose

To persist data beyond the life of containers by mounting host directories or named volumes.

23
New cards

Basic Structure of docker-compose.yml

version, services, volumes, networks

24
New cards

docker-compose up

Starts containers using Docker Compose

25
New cards

docker-compose down

Stops containers using Docker Compose

26
New cards

docker-compose ps

View running containers in Docker Compose