diff --git a/docker/Dockerfile b/docker/Dockerfile index da7a6da984..0447756bfe 100755 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,10 +1,10 @@ # vim:set ft=dockerfile: #### -# base_image - Bare bones image with the base packages needed to run Mayan EDMS +# BASE_IMAGE - Bare bones image with the base packages needed to run Mayan EDMS #### -FROM debian:10.0-slim as base_image +FROM debian:10.0-slim as BASE_IMAGE LABEL maintainer="Roberto Rosario roberto.rosario@mayan-edms.com" @@ -57,16 +57,15 @@ apt-get update \ && if [ "$(uname -m)" = "armv7l" ]; then \ ln -s /usr/lib/arm-linux-gnueabihf/libz.so /usr/lib/ \ && ln -s /usr/lib/arm-linux-gnueabihf/libjpeg.so /usr/lib/ \ -; fi \ -&& rm -rf /var/lib/apt/lists/* +; fi #### -# builder_image - This image builds the Python package and is discarded afterwards +# BUILDER_IMAGE - This image builds the Python package and is discarded afterwards # only the build artifact is carried over to the next image. #### # Reuse image -FROM base_image as builder_image +FROM BASE_IMAGE as BUILDER_IMAGE # Python libraries caching ARG PIP_INDEX_URL @@ -137,12 +136,12 @@ RUN set -a \ COPY --chown=mayan:mayan requirements/testing-base.txt "${PROJECT_INSTALL_DIR}" #### -# Final image - base_image + builder_image artifact (Mayan install directory) +# Final image - BASE_IMAGE + BUILDER_IMAGE artifact (Mayan install directory) #### -FROM base_image +FROM BASE_IMAGE -COPY --from=builder_image --chown=mayan:mayan "${PROJECT_INSTALL_DIR}/" "${PROJECT_INSTALL_DIR}/" +COPY --from=BUILDER_IMAGE --chown=mayan:mayan "${PROJECT_INSTALL_DIR}/" "${PROJECT_INSTALL_DIR}/" USER root