Enable configuration of UID of user in Docker container.
This commit is contained in:
parent
ebdd436bd0
commit
63915e3cc2
2
build.sh
2
build.sh
|
@ -29,6 +29,7 @@ set -e
|
||||||
|
|
||||||
VERSION=${1:-2018}
|
VERSION=${1:-2018}
|
||||||
SESSIONS=${2:-"HOL"}
|
SESSIONS=${2:-"HOL"}
|
||||||
|
DOCKERUID=${3:-`id -u`}
|
||||||
|
|
||||||
# Generate base image
|
# Generate base image
|
||||||
docker build -t logicalhacking:debian4isabelle debian4isabelle
|
docker build -t logicalhacking:debian4isabelle debian4isabelle
|
||||||
|
@ -48,6 +49,7 @@ for url in $ISA_URL $AFP_URL/$AFP_TAR; do
|
||||||
done
|
done
|
||||||
|
|
||||||
docker build -t logicalhacking:isabelle$VERSION isabelle \
|
docker build -t logicalhacking:isabelle$VERSION isabelle \
|
||||||
|
--build-arg uid=$DOCKERUID \
|
||||||
--build-arg sessions=$SESSIONS \
|
--build-arg sessions=$SESSIONS \
|
||||||
--build-arg isabelle=$ISA_URL \
|
--build-arg isabelle=$ISA_URL \
|
||||||
--build-arg afp=$AFP_URL/$AFP_TAR
|
--build-arg afp=$AFP_URL/$AFP_TAR
|
||||||
|
|
|
@ -29,6 +29,7 @@ FROM logicalhacking:debian4isabelle
|
||||||
ARG isabelle
|
ARG isabelle
|
||||||
ARG afp
|
ARG afp
|
||||||
ARG sessions
|
ARG sessions
|
||||||
|
ARG uid
|
||||||
|
|
||||||
LABEL isabelle.url="$isabelle"
|
LABEL isabelle.url="$isabelle"
|
||||||
LABEL isabelle.afp.url="$afp"
|
LABEL isabelle.afp.url="$afp"
|
||||||
|
@ -37,7 +38,7 @@ LABEL isabelle.sessions="$sessions"
|
||||||
SHELL ["/bin/bash", "-c"]
|
SHELL ["/bin/bash", "-c"]
|
||||||
|
|
||||||
# Create default user (isabelle)
|
# Create default user (isabelle)
|
||||||
RUN useradd -m isabelle && (echo isabelle:isabelle | chpasswd)
|
RUN useradd -u $uid -m isabelle && (echo isabelle:isabelle | chpasswd)
|
||||||
USER isabelle
|
USER isabelle
|
||||||
|
|
||||||
# Install Isabelle and corresponding AFP
|
# Install Isabelle and corresponding AFP
|
||||||
|
|
Loading…
Reference in New Issue