Skip to content

Commit 1b6b59b

Browse files
authored
fix #145 only sym-link .ivy2 if it exists (#147)
1 parent 13ed868 commit 1b6b59b

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

debian/Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,9 @@ RUN \
7272
# This allows users of this container to choose, whether they want to run the container as sbtuser (non-root) or as root
7373
USER root
7474
RUN \
75-
mkdir -p /home/sbtuser/.ivy2 && \
76-
chown -R sbtuser:sbtuser /home/sbtuser/.ivy2 && \
7775
ln -s /home/sbtuser/.cache /root/.cache && \
78-
ln -s /home/sbtuser/.ivy2 /root/.ivy2 && \
79-
ln -s /home/sbtuser/.sbt /root/.sbt
76+
ln -s /home/sbtuser/.sbt /root/.sbt && \
77+
if [ -d "/home/sbtuser/.ivy2" ]; then ln -s /home/sbtuser/.ivy2 /root/.ivy2; fi
8078

8179
# Switch working directory back to root
8280
## Users wanting to use this container as non-root should combine the two following arguments

graalvm-ce/Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,9 @@ RUN \
6868
# This allows users of this container to choose, whether they want to run the container as sbtuser (non-root) or as root
6969
USER root
7070
RUN \
71-
mkdir -p /home/sbtuser/.ivy2 && \
72-
chown -R sbtuser:sbtuser /home/sbtuser/.ivy2 && \
7371
ln -s /home/sbtuser/.cache /root/.cache && \
74-
ln -s /home/sbtuser/.ivy2 /root/.ivy2 && \
75-
ln -s /home/sbtuser/.sbt /root/.sbt
72+
ln -s /home/sbtuser/.sbt /root/.sbt && \
73+
if [ -d "/home/sbtuser/.ivy2" ]; then ln -s /home/sbtuser/.ivy2 /root/.ivy2; fi
7674

7775
# Switch working directory back to root
7876
## Users wanting to use this container as non-root should combine the two following arguments

oracle/Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,9 @@ RUN \
7070
# This allows users of this container to choose, whether they want to run the container as sbtuser (non-root) or as root
7171
USER root
7272
RUN \
73-
mkdir -p /home/sbtuser/.ivy2 && \
74-
chown -R sbtuser:sbtuser /home/sbtuser/.ivy2 && \
7573
ln -s /home/sbtuser/.cache /root/.cache && \
76-
ln -s /home/sbtuser/.ivy2 /root/.ivy2 && \
77-
ln -s /home/sbtuser/.sbt /root/.sbt
74+
ln -s /home/sbtuser/.sbt /root/.sbt && \
75+
if [ -d "/home/sbtuser/.ivy2" ]; then ln -s /home/sbtuser/.ivy2 /root/.ivy2; fi
7876

7977
# Switch working directory back to root
8078
## Users wanting to use this container as non-root should combine the two following arguments

0 commit comments

Comments
 (0)