Professional Documents
Culture Documents
Dockerfile
echo -e 'FROM busybox\nRUN echo "hello world"' | docker
Can be piped using stdin
build -
If you list more than one CMD then only the last CMD will
CMD
take effect.
CMD vs ENTRYPOINT
cmd commands can be overridden but entrypoint cant be
overrriden
initializes a new build stage and sets the Base Image for
subsequent instructions
Create container images for solutions by using BUILDVARIANT - variant component of BUILDPLATFORM
Docker
not persisted into the built image
key-value pair
LABEL
image can have more than one label
EXPOSE
does not actually publish the port
VOLUME instruction creates a mount point with the On a drive other than C:/
VOLUME specified name and marks it as holding externally Windows
mounted volumes from native host or other containers Empty or non existing directory
sets the user name (or UID) and optionally the user group
(or GID) to use when running the image and for any RUN,
USER
CMD and ENTRYPOINT instructions that follow it in the
Dockerfile
Application portability
What?
Software containerization is an OS virtualization method
that is used to deploy and run containers without using a
virtual machine
Image version
Tag
One image can have multiple tags
Container image
portable package that contains software
Container OS
Isolated from the host
dockerd Daemon
Server
Track container life cycle
Client docker
Base image
Services to expose
CLI
Default
Bridge
Containers in the default bridge network can access other
Cannot access by container hostname
containers by IP address
Network Types
80 - container
Can map ports to the host --publish 80:8080
Docker
8080 - host
Series of repositories
Container isolation
Application delivery
Cloud deployments