Ravindra BagaleCourses & study guides मराठी

Ravi Sir's Cards › DevOps

Chapter 48: Docker Images: Layers, Tags, Registries, Docker Hub, ECR, Multi-Arch and Every Image Command: Cards

मराठी cards · Open the chapter

Revision cards

Images and layers. Big images are slow to push and pull.
Revision card 1 of 10: Images and layers · Download PNG · Open card page

Lesson: 48.1 Images and layers: what is inside an image

Image names, tags and digests. A tag can point to a new image tomorrow.
Revision card 2 of 10: Image names, tags and digests · Download PNG · Open card page

Lesson: 48.2 Image names, tags and digests

Push and pull with Docker Hub. Other machines need your image.
Revision card 3 of 10: Push and pull with Docker Hub · Download PNG · Open card page

Lesson: 48.3 Push and pull with Docker Hub

Push to Amazon ECR. AWS services pull fastest and safest from ECR.
Revision card 4 of 10: Push to Amazon ECR · Download PNG · Open card page

Lesson: 48.4 Push to Amazon ECR

Run your own private registry. Some networks cannot reach the internet.
Revision card 5 of 10: Run your own private registry · Download PNG · Open card page

Lesson: 48.5 Run your own private registry

save, load, export and import. Sometimes you must carry an image on a disk.
Revision card 6 of 10: save, load, export and import · Download PNG · Open card page

Lesson: 48.6 save, load, export and import: move images without a registry

Multi-arch images with buildx. One tag must work on Intel and ARM machines.
Revision card 7 of 10: Multi-arch images with buildx · Download PNG · Open card page

Lesson: 48.7 Multi-arch images with buildx

Make images small and fast. Small images deploy faster and have fewer CVEs.
Revision card 8 of 10: Make images small and fast · Download PNG · Open card page

Lesson: 48.8 Make images small and fast

Clean up images. Build agents fill their disks with old images.
Revision card 9 of 10: Clean up images · Download PNG · Open card page

Lesson: 48.9 Clean up images: dangling, unused and prune

Every docker image command. One table beats searching docs during an outage.
Revision card 10 of 10: Every docker image command · Download PNG · Open card page

Lesson: 48.10 Every docker image command: full reference

Interview cards

What is an image layer? A read-only filesystem diff from one build step, identified by a hash and shared between images; a container adds one writable layer on top.
Interview card 1 of 10: What is an image layer? · Download PNG · Open card page

Lesson: 48.1 Images and layers: what is inside an image

Tag vs digest? A tag is mutable (nginx:latest can change); a digest (@sha256:...) is immutable and identifies exact content.
Interview card 2 of 10: Tag vs digest? · Download PNG · Open card page

Lesson: 48.2 Image names, tags and digests

How do you push an image to Docker Hub? docker login (token via --password-stdin), docker tag app user/app:1.0, docker push user/app:1.0.
Interview card 3 of 10: How do you push an image to Docker Hub? · Download PNG · Open card page

Lesson: 48.3 Push and pull with Docker Hub

How do you log in to ECR? aws ecr get-login-password --region R | docker login --username AWS --password-stdin ACCOUNT.dkr.ecr.R.amazonaws.com. The token lasts 12 hours.
Interview card 4 of 10: How do you log in to ECR? · Download PNG · Open card page

Lesson: 48.4 Push to Amazon ECR

How do you run a private registry? docker run -d -p 5000:5000 -v reg:/var/lib/registry registry:2; add TLS and auth for anything beyond localhost.
Interview card 5 of 10: How do you run a private registry? · Download PNG · Open card page

Lesson: 48.5 Run your own private registry

save vs export? docker save writes an image with all layers and tags; docker export writes one container's flattened filesystem without history or CMD.
Interview card 6 of 10: save vs export? · Download PNG · Open card page

Lesson: 48.6 save, load, export and import: move images without a registry

How do you build a multi-arch image? docker buildx build --platform linux/amd64,linux/arm64 -t repo/app:1 --push .; the registry serves the right one per machine.
Interview card 7 of 10: How do you build a multi-arch image? · Download PNG · Open card page

Lesson: 48.7 Multi-arch images with buildx

How do you reduce image size? Slim/distroless base, multi-stage builds, cleanup in the same RUN, a good .dockerignore, production-only dependencies.
Interview card 8 of 10: How do you reduce image size? · Download PNG · Open card page

Lesson: 48.8 Make images small and fast

Dangling vs unused image? Dangling: no tag (), left by rebuilds. Unused: tagged but no container uses it. prune removes dangling; prune -a removes both.
Interview card 9 of 10: Dangling vs unused image? · Download PNG · Open card page

Lesson: 48.9 Clean up images: dangling, unused and prune

Name the docker image subcommands. build, history, import, inspect, load, ls, prune, pull, push, rm, save, tag.
Interview card 10 of 10: Name the docker image subcommands. · Download PNG · Open card page

Lesson: 48.10 Every docker image command: full reference

Comparison cards

Tag vs Digest. Tag: a movable name like 1.27.Digest: the sha256 of the content.
Comparison card 1 of 3: Tag vs Digest · Download PNG · Open card page

Lesson: 48.2 Image names, tags and digests

docker save vs docker export. save: image to tar with layers and tags.export: container filesystem to a flat tar.
Comparison card 2 of 3: docker save vs docker export · Download PNG · Open card page

Lesson: 48.6 save, load, export and import: move images without a registry

Docker Hub vs Amazon ECR. Docker Hub: Docker's public and private registry.ECR: AWS private registry.
Comparison card 3 of 3: Docker Hub vs Amazon ECR · Download PNG · Open card page

Lesson: 48.4 Push to Amazon ECR