Difference between revisions of "Dockerfile"
Jump to navigation
Jump to search
↑ https://en.wikiversity.org/wiki/DevOps/Docker/Dockerfile
↑ https://kapeli.com/cheat_sheets/Dockerfile.docset/Contents/Resources/Documents/index
Tags: Mobile web edit, Mobile edit |
Tags: Mobile web edit, Mobile edit |
||
Line 28: | Line 28: | ||
== Related terms == | == Related terms == | ||
+ | * <code>[[docker build]]</code> | ||
* [[Docker Engine release notes]] | * [[Docker Engine release notes]] | ||
* [[BuildKit]] Dockerfile-agnostic builder toolkit | * [[BuildKit]] Dockerfile-agnostic builder toolkit | ||
* <code>[[docker start]]</code> | * <code>[[docker start]]</code> | ||
* <code>[[docker run]]</code> | * <code>[[docker run]]</code> | ||
− | |||
* [[Dockerfile examples]] | * [[Dockerfile examples]] | ||
* [[Buildpack]] | * [[Buildpack]] |
Revision as of 12:51, 11 June 2022
Dockerfile
is a text file where you define instructions used to create your Docker images, check official Dockerfile Reference documentation: https://docs.docker.com/engine/reference/builder/[1]
For creating this file with instructions usually called Dockerfile you can use the following keywords[2]:
- ADD
- ARG
- CMD, for executing containers. https://docs.docker.com/engine/reference/builder/#cmd
- COPY
- ENTRYPOINT: https://docs.docker.com/engine/reference/builder/#entrypoint
- ENV
- EXPOSE
- FROM https://docs.docker.com/engine/reference/builder/#from
- HEALTHCHECK https://docs.docker.com/engine/reference/builder/#healthcheck (>= Docker 1.12)
- LABEL
- ONBUILD
- RUN: https://docs.docker.com/engine/reference/builder/#run
- SHELL
- STOPSIGNAL
- USER
- VOLUME, creates a mount point
- WORKDIR
Activities
- Learn differences between RUN and CMD or ENTRYPOINT: https://stackoverflow.com/a/25150809
- Read Understand how CMD and ENTRYPOINT interact https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact
- Learn about start configuration behavior and restart policy
- Learn about
.dockerignore
file - Read
Dockerfile
best practices https://docs.docker.com/develop/develop-images/dockerfile_best-practices/
Related terms
docker build
- Docker Engine release notes
- BuildKit Dockerfile-agnostic builder toolkit
docker start
docker run
- Dockerfile examples
- Buildpack
See also
Dockerfile: FROM, RUN, CMD, ENTRYPOINT, WORKDIR, COPY, ADD, USER, ENV, ARG, HEALTHCHECK
,hadolint, LABEL, EXPOSE
docker-compose
,docker-compose.yml
: [services
|volumes
|networks
|up
|down
|restart
|logs
|create
|changelog
|version
|secrets
|config
|-v
|-h
|exec], docker-compose pull
,Environment:
, Docker-compose.yml examples,.env
, release notes, expose:, docker-compose --env-file,services.deploy.resources
- Docker:
docker-compose
, Docker Desktop, Docker Scout, Docker Swarm, Docker Volumes, Docker images management, docker network,docker inspect
,docker volume inspect
,Dockerfile
, Docker Engine release notes,docker kill
,moby
, Docker-in-Docker,docker context
,buildx
,docker tag
,docker system prune
, Docker Hub,hub-tool, /etc/docker/daemon.json
,hostconfig.json
, dockerd, logs, Docker logging, Backup,docker service
,depends on
,--dns, --filter
,--mount
,docker login
,docker build
,apt remove docker.io
,.dockerignore
, docker context ls |docker-machine, .docker/
, PWD,$HOME/.docker/config.json
, Docker ID,--env-file, docker --help
Makefile
Advertising: