Please enable JavaScript.
Coggle requires JavaScript to display documents.
docker (Dockerfile (ADD (copies new files, directories or remote file URLs…
docker
Dockerfile
ADD
copies new files, directories or remote file URLs from <src> and adds them to the filesystem of the image at the path <dest>
COPY
copies new files or directories from <src> and adds them to the filesystem of the container at the path <dest>
-
-
-
-
-
USER
sets the user name (or UID) and optionally the user group (or GID) to use when running the image and for any RUN, CMD and ENTRYPOINT instructions that follow it in the Dockerfile
VOLUME
creates a mount point with the specified name and marks it as holding externally mounted volumes from native host or other containers
WORKDIR
sets the working directory for any RUN, CMD, ENTRYPOINT, COPY and ADD instructions that follow it in the Dockerfile
RUN
executes command(s) in a new layer and creates a new image. E.g., it is often used for installing software packages.
CMD
sets default command and/or parameters, which can be overwritten from command line when docker container runs.
-
ARG
defines a variable that users can pass at build-time to the builder with the docker build command using the --build-arg <varname>=<value> flag
ONBUILD
adds to the image a trigger instruction to be executed at a later time, when the image is used as the base for another build
-
docker container
docker container run
-
-
-
-
-
-
-
-
-
-
docker container run -d --name mysql -e MYSQL_ALLOW_EMPTY_PASSWORD=True -v mysql-db:/var/lib/mysql mysql
-
-
-
-
-
-
-
-
-
-
-
-
-
docker-compose
-
-
-
-
-
-
-
docker-compose.yml
version: '3.1' # if no version is specificed then v1 is assumed. Recommend v2 minimum
services: # containers. same as docker run
__servicename: # a friendly name. this is also DNS name inside network
____image: # Optional if you use build:
____command: # Optional, replace the default CMD specified by the image
____environment: # Optional, same as -e in docker run
____volumes: # Optional, same as -v in docker run
__servicename2:
volumes: # Optional, same as docker volume create
networks: # Optional, same as docker network create
-
-
-
-
docker secret
-
-
-
docker service create --name psql --secret psql_user --secret psql_pass -e POSTGRES_PASSWORD_FILE=/run/secrets/psql_pass -e POSTGRES_USER_FILENAME=/run/secrets/psql_user postgres
-
-
-
-
-
-
-
-
-
-
-