mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-19 07:44:23 +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>
|
MAINTAINER Timo Pagel <dependencycheckmaintainer@timo-pagel.de>
|
||||||
|
|
||||||
|
ENV user=dockeruser
|
||||||
|
|
||||||
RUN wget -O /tmp/current.txt http://jeremylong.github.io/DependencyCheck/current.txt && \
|
RUN wget -O /tmp/current.txt http://jeremylong.github.io/DependencyCheck/current.txt && \
|
||||||
current=$(cat /tmp/current.txt) && \
|
current=$(cat /tmp/current.txt) && \
|
||||||
wget https://dl.bintray.com/jeremy-long/owasp/dependency-check-$current-release.zip && \
|
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 && \
|
rm dependency-check-$current-release.zip && \
|
||||||
mv dependency-check /usr/share/
|
mv dependency-check /usr/share/
|
||||||
|
|
||||||
RUN useradd -ms /bin/bash dockeruser && \
|
RUN useradd -ms /bin/bash ${user} && \
|
||||||
chown -R dockeruser:dockeruser /usr/share/dependency-check && \
|
chown -R ${user}:${user} /usr/share/dependency-check && \
|
||||||
mkdir /report && \
|
mkdir /report && \
|
||||||
chown -R dockeruser:dockeruser /report
|
chown -R ${user}:${user} /report
|
||||||
|
|
||||||
USER dockeruser
|
USER ${user}
|
||||||
|
|
||||||
VOLUME ["/src" "/usr/share/dependency-check/data" "/report"]
|
VOLUME ["/src" "/usr/share/dependency-check/data" "/report"]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user