File tree 3 files changed +6
-12
lines changed 3 files changed +6
-12
lines changed Original file line number Diff line number Diff line change 72
72
# This allows users of this container to choose, whether they want to run the container as sbtuser (non-root) or as root
73
73
USER root
74
74
RUN \
75
- mkdir -p /home/sbtuser/.ivy2 && \
76
- chown -R sbtuser:sbtuser /home/sbtuser/.ivy2 && \
77
75
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
80
78
81
79
# Switch working directory back to root
82
80
# # Users wanting to use this container as non-root should combine the two following arguments
Original file line number Diff line number Diff line change 68
68
# This allows users of this container to choose, whether they want to run the container as sbtuser (non-root) or as root
69
69
USER root
70
70
RUN \
71
- mkdir -p /home/sbtuser/.ivy2 && \
72
- chown -R sbtuser:sbtuser /home/sbtuser/.ivy2 && \
73
71
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
76
74
77
75
# Switch working directory back to root
78
76
# # Users wanting to use this container as non-root should combine the two following arguments
Original file line number Diff line number Diff line change 70
70
# This allows users of this container to choose, whether they want to run the container as sbtuser (non-root) or as root
71
71
USER root
72
72
RUN \
73
- mkdir -p /home/sbtuser/.ivy2 && \
74
- chown -R sbtuser:sbtuser /home/sbtuser/.ivy2 && \
75
73
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
78
76
79
77
# Switch working directory back to root
80
78
# # Users wanting to use this container as non-root should combine the two following arguments
You can’t perform that action at this time.
0 commit comments