fix: add USER and RUNNER_USER to /etc/environment

This commit is contained in:
hackercat
2021-04-04 13:53:53 +00:00
parent 7cf55a7620
commit d2182b9ac8
+4
View File
@@ -17,6 +17,8 @@ SHELL [ "/bin/bash", "-c" ]
# > setup environment required for GitHub Actions
RUN set -Eeuxo pipefail \
&& printf "Build started\n" \
&& echo "USER=$(whoami)" | tee -a /etc/environment \
&& echo "RUNNER_USER=$(whoami)" | tee -a /etc/environment \
&& ImageOS=${DISTRIB_ID}$(echo ${DISTRIB_RELEASE} | cut -d'.' -f 1) \
&& echo "IMAGE_OS=$ImageOS" | tee -a /etc/environment \
&& echo "ImageOS=$ImageOS" | tee -a /etc/environment \
@@ -71,6 +73,8 @@ RUN set -Eeuxo pipefail \
# > Home repository
LABEL org.opencontainers.image.source="https://github.com/catthehacker/docker_images"
USER root
SHELL [ "/bin/bash", "--login", "-c" ]
# > Force bash with environment