diff --git a/ci/Dockerfile.debian b/ci/Dockerfile.debian index 45c44d350..f6dcf8ed6 100644 --- a/ci/Dockerfile.debian +++ b/ci/Dockerfile.debian @@ -1,7 +1,7 @@ # Base Target to build and install all needed base configuration and packages. Specifie the needed platform with the docker '--platform XXX' option ARG DEBIAN_CODENAME=bullseye ARG BASE_TEST_IMAGE=test-code -FROM debian:${DEBIAN_CODENAME}-slim as base +FROM debian:${DEBIAN_CODENAME}-slim AS base ARG DEBIAN_CODENAME ENV DOCKER_RUNNING=true @@ -34,7 +34,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # ------ # Base Target for setting up the default user. user can be selected with the docker '--user YYY' option -FROM base as user +FROM base AS user ARG USER=pi ARG USER_GROUP=$USER @@ -50,7 +50,7 @@ RUN groupadd --gid 1000 $USER_GROUP \ ####### Code Targets ####### # Target for adding code from the repo. Set Default User -FROM user as code +FROM user AS code COPY --chown=$USER:$USER_GROUP --chmod=770 . /code WORKDIR /code @@ -63,7 +63,7 @@ USER $USER ####### Test Targets ####### # Target for setting up an alternativ user 'hans:wurst'. user can be selected with the docker '--user YYY' option -FROM user as test-user +FROM user AS test-user ENV TEST_USER_GROUP=test @@ -79,7 +79,7 @@ RUN export USER_ALT=hans \ # Target for adding envs and scripts from the repo to test installation -FROM test-user as test-code +FROM test-user AS test-code ARG GIT_BRANCH ARG GIT_URL @@ -104,7 +104,7 @@ COPY --chown=root:$TEST_USER_GROUP --chmod=770 scripts/installscripts/tests/*.sh # Target for applying latest updates (should not be cached!) -FROM $BASE_TEST_IMAGE as test-update +FROM $BASE_TEST_IMAGE AS test-update RUN export DEBIAN_FRONTEND=noninteractive \ && apt-get update \ && apt-get -y upgrade \