From aa5419824a400d8e7a09da3682c1f5113c4003c8 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Mon, 30 Dec 2024 20:45:56 +0100 Subject: [PATCH] debug: test: https://github.com/docker/build-push-action/issues/390#issuecomment-866761773 --- Dockerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7fb3471..bcc1d18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,11 @@ FROM python:3.13.1-bookworm +# lese secrets von pipeline ein +RUN --mount=type=secret,id=GITUSERPW \ + --mount=type=secret,id=GITUSER \ + export GITUSERPW=$(cat /run/secrets/GITUSERPW) && \ + export GITUSER=$(cat /run/secrets/GITUSER) + ENV DEBIAN_FRONTEND=noninteractive # nötig damit die ansible-tools gefunden werden ENV PATH="$PATH:/home/ansible-dev/.local/bin" @@ -45,12 +51,11 @@ USER ansible-dev WORKDIR /home/ansible-dev/ -RUN echo $forgejo_user $forgejo_user_pass -RUN echo https://$forgejo_user:$forgejo_user_pass@git.mgrote.net/mg/dotfiles ~/dotfiles +RUN echo https://$GITUSER:$GITUSERPW@git.mgrote.net/mg/dotfiles ~/dotfiles # dotfiles, see: https://git.mgrote.net/mg/dotfiles/raw/branch/master/scripts/setup_minimal.sh # hadolint ignore=DL3001,SC1083 -RUN git clone https://$forgejo_user:$forgejo_user_pass@git.mgrote.net/mg/dotfiles ~/dotfiles +RUN git clone https://$GITUSER:$GITUSERPW@git.mgrote.net/mg/dotfiles ~/dotfiles COPY --chown=ansible-dev:ansible-dev start_tmux.sh . ENTRYPOINT []