Content

Contents

    Dockerfile reference

    Basic Dockerfile

    Anatomy

    FROM <baseimage>
    WORKDIR <container-filesystem>
    COPY <local-filesystem> <container-filesystem>
    RUN <command>
    CMD <stratup-command>
    

    Multi-steps builds

    Example

    FROM node:alpine as builder
    WORKDIR '/app'
    COPY package.json .
    RUN npm install
    COPY . .
    RUN npm build
    
    FROM nginx
    EXPOSE 80
    COPY --from builder /app/build /usr/share/nginx/html
    

    Notes

    Proudly Powered by Zim 0.75.2.

    Template by Etienne Gandrille, based on ZeroFiveEight and using JQuery Toc Plugin.