====== Short docker info ====== docker container ls --filter "status=running" --format 'table {{.ID}}\t{{.Names}}\t{{.Status}}\t{{.Image}}' ====== Show path to container log ====== docker inspect container_name|grep LogPath ====== Security: pull images ====== Once a week stop using caching and update all layers (//--pull --no-cache//): docker build --pull --no-cache -t image-tag . ====== Python multistage builds ====== ARG MY_PYTHON_VER=3.8.10 # base FROM python:${MY_PYTHON_VER}-buster as base COPY ./requirements.txt / RUN pip wheel --no-cache-dir --no-deps --wheel-dir /wheels -r requirements.txt # stage FROM python:${MY_PYTHON_VER}-slim-buster RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get -y upgrade && \ DEBIAN_FRONTEND=noninteractive apt-get -y install jq && \ apt-get clean WORKDIR /usr/src/app COPY --from=base /wheels /wheels COPY --from=base requirements.txt . RUN pip install --no-cache /wheels/* COPY . /usr/src/app CMD gunicorn -b 0.0.0.0:5000 manage:app