skip to content
Ivan's wiki
Site Tools
Search
Tools
Show pagesource
Backlinks
Recent Changes
Media Manager
Sitemap
>
Recent Changes
Media Manager
Sitemap
docker-building
This page is read only. You can view the source, but not change it.
# Docker building images **Building** creates an image from a Dockerfile. Run `docker build -t <name> .` to build from the Dockerfile in the current directory. The `.` is the **build context**: the files Docker has access to for `COPY` instructions. Keep large files out of it using `.dockerignore`. ```bash $ docker build -t myapp:latest . # build and tag $ docker build -t myapp:1.0 -f Dockerfile.prod . # custom Dockerfile $ docker build --no-cache -t myapp . # rebuild without using cache ``` Docker sends the entire build context to the daemon on every build, so large build contexts slow builds. Use `.dockerignore` to exclude files (like `.git/`, `node_modules/`, etc.). Builds fail if the Dockerfile has errors or if a `RUN` command exits with a non-zero status.
Page Tools
Show pagesource
Backlinks
Back to top