mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-15 16:23:37 +01:00
Refactor user name into variable.
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -2,6 +2,8 @@ FROM java:8
|
||||
|
||||
MAINTAINER Timo Pagel <dependencycheckmaintainer@timo-pagel.de>
|
||||
|
||||
ENV user=dockeruser
|
||||
|
||||
RUN wget -O /tmp/current.txt http://jeremylong.github.io/DependencyCheck/current.txt && \
|
||||
current=$(cat /tmp/current.txt) && \
|
||||
wget https://dl.bintray.com/jeremy-long/owasp/dependency-check-$current-release.zip && \
|
||||
@@ -9,12 +11,12 @@ RUN wget -O /tmp/current.txt http://jeremylong.github.io/DependencyCheck/current
|
||||
rm dependency-check-$current-release.zip && \
|
||||
mv dependency-check /usr/share/
|
||||
|
||||
RUN useradd -ms /bin/bash dockeruser && \
|
||||
chown -R dockeruser:dockeruser /usr/share/dependency-check && \
|
||||
RUN useradd -ms /bin/bash ${user} && \
|
||||
chown -R ${user}:${user} /usr/share/dependency-check && \
|
||||
mkdir /report && \
|
||||
chown -R dockeruser:dockeruser /report
|
||||
chown -R ${user}:${user} /report
|
||||
|
||||
USER dockeruser
|
||||
USER ${user}
|
||||
|
||||
VOLUME ["/src" "/usr/share/dependency-check/data" "/report"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user