build: follow-up prev: only use host userid for local dev builds
reproducibility probably needs a hardcoded userid Also, move the UID arg later in the dockerfiles, for better caching. (if local dev build and repro build set different UIDs, the build caches will diverge at that step)
This commit is contained in:
@@ -4,8 +4,6 @@
|
||||
|
||||
FROM debian:buster@sha256:233c3bbc892229c82da7231980d50adceba4db56a08c0b7053a4852782703459
|
||||
|
||||
ARG UID=1000
|
||||
|
||||
ENV LC_ALL=C.UTF-8 LANG=C.UTF-8
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
@@ -73,6 +71,7 @@ RUN apt-get update -q && \
|
||||
apt-get clean
|
||||
|
||||
# create new user to avoid using root; but with sudo access and no password for convenience.
|
||||
ARG UID=1000
|
||||
ENV USER="user"
|
||||
ENV HOME_DIR="/home/${USER}"
|
||||
ENV WORK_DIR="${HOME_DIR}/wspace" \
|
||||
|
||||
@@ -22,10 +22,13 @@ if [ ! -z "$ELECBUILD_NOCACHE" ] ; then
|
||||
DOCKER_BUILD_FLAGS="--pull --no-cache"
|
||||
fi
|
||||
|
||||
if [ -z "$ELECBUILD_COMMIT" ] ; then # local dev build
|
||||
DOCKER_BUILD_FLAGS="$DOCKER_BUILD_FLAGS --build-arg UID=$BUILD_UID"
|
||||
fi
|
||||
|
||||
info "building docker image."
|
||||
docker build \
|
||||
$DOCKER_BUILD_FLAGS \
|
||||
--build-arg UID=$BUILD_UID \
|
||||
-t electrum-appimage-builder-img \
|
||||
"$CONTRIB_APPIMAGE"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user