Differences from Dockerfile¶
The project started as one-to-one mapping of Dockerfile instructions to Python, and then we evolved some components to provide a more friendly and safe API. If you’re familiar with Dockerfile and looking for a quick start with docked, there are some differences that you should know:
There is no FROM. Instead, pass arguments (
base
,name
, andplatform
) intodocked.Stage
.There is no MAINTAINER. Use
labels
instead.There is no LABEL. Pass
labels
argument intodocked.Stage
instead.There is no ADD. Instead, use
docked.COPY
,docked.EXTRACT
,docked.CLONE
, ordocked.DOWNLOAD
.There is no way to declare ARG before FROM. If you need to parametrize the base image, do it on the Python level.
If shell will be used to run the command or not depends not on if you pass a list or a string but on
shell
argument. The argument is True by default fordocked.RUN
and False for everything else (docked.HEALTHCHECK
,docked.CMD
,docked.ENTRYPOINT
).We call instructions steps (
docked.Step
) for bravity.There is a clear separation between commans that affect build and the ones that take effect in runtime. That means, there is no way to put
docked.VOLUME
somewhere before, let’s say,docked.RUN
.