指令
Last updated
EXPOSE <port> [<port>...]ENV <key> <value>ENV PG_MAJOR 9.3
ENV PG_VERSION 9.3.4
RUN curl -SL http://example.com/postgres-$PG_VERSION.tar.xz | tar -xJC /usr/src/postgress && …
ENV PATH /usr/local/postgres-$PG_MAJOR/bin:$PATHADD <src> <dest>COPY <src> <dest>ENTRYPOINT ["executable", "<param1>", "<param2>"]
ENTRYPOINT <command> <param1> <param2>`VOLUME ["/data"]USER daemonWORKDIR </path/to/workdir>WORKDIR /a
WORKDIR b
WORKDIR c
RUN pwdONBUILD [instruction][...]
ONBUILD ADD . /app/src
ONBUILD RUN /usr/local/bin/python-build --dir /app/src
[...]FROM image-A
#Automatically run the following
ADD . /app/src
RUN /usr/local/bin/python-build --dir /app/src