Dockerfile
← Back to Docker
A text file with instructions for building a Docker image. Key instructions: FROM (base image), RUN (execute commands), COPY/ADD (add files), WORKDIR (set directory), ENV (environment variables), EXPOSE (document ports), CMD/ENTRYPOINT (container startup command). Best practices: minimize layers, order by change frequency, use .dockerignore.