wget
or curl
but not both DOK-DL4001Don't install two tools that have the same effect to avoid the additional cruft.
sudo
DOK-DL3004Do not use sudo
as it leads to unpredictable behavior and possibly security vulnerabilities. Use a tool like gosu
to perform user switching operations.
Use function_name()
and refer to passed parameters as $1
, $2
etc. Shell script functions behave just like scripts and other commands: - They always take 0 to N parameters, referred to by $1
, $2
etc. They cannot declare parameters by name.
apt-get
lists after installing anything DOK-DL3009Cleaning up the apt cache and removing /var/lib/apt/lists
helps keep the image size down. Since the RUN
statement starts with apt-get update
, the package cache will always be refreshed prior to apt-get install
.
WORKDIR
DOK-DL3000By using absolute paths you will not run into problems when a previous WORKDIR
instruction changes. You also often don't know the WORKDIR
context of your base container.