adjustments for arbitrary user support (openshift guideline) (#830)
* adjustments for arbitrary user support (openshift guideline) * do not create up front .webgoat
This commit is contained in:
parent
98d17433f1
commit
1cbaade9ab
@ -5,10 +5,12 @@ ENV webgoat_version_env=${webgoat_version}
|
|||||||
|
|
||||||
RUN apt-get update && apt-get install
|
RUN apt-get update && apt-get install
|
||||||
RUN useradd --home-dir /home/webgoat --create-home -U webgoat
|
RUN useradd --home-dir /home/webgoat --create-home -U webgoat
|
||||||
|
RUN cd /home/webgoat/;
|
||||||
|
RUN chgrp -R 0 /home/webgoat
|
||||||
|
RUN chmod -R g=u /home/webgoat
|
||||||
RUN apt-get -y install apt-utils nginx
|
RUN apt-get -y install apt-utils nginx
|
||||||
|
|
||||||
USER webgoat
|
USER webgoat
|
||||||
RUN cd /home/webgoat/; mkdir -p .webgoat-${webgoat_version}
|
|
||||||
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
COPY index.html /usr/share/nginx/html/
|
COPY index.html /usr/share/nginx/html/
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
cd /home/webgoat
|
cd /home/webgoat
|
||||||
service nginx start
|
service nginx start
|
||||||
sleep 1
|
sleep 1
|
||||||
java -Dfile.encoding=UTF-8 -jar webgoat.jar --webgoat.build.version=$1 --server.address=0.0.0.0 > webgoat.log &
|
java -Duser.home=/home/webgoat -Dfile.encoding=UTF-8 -jar webgoat.jar --webgoat.build.version=$1 --server.address=0.0.0.0 > webgoat.log &
|
||||||
|
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
java -Dfile.encoding=UTF-8 -jar webwolf.jar --webgoat.build.version=$1 --server.address=0.0.0.0 > webwolf.log &
|
java -Duser.home=/home/webgoat -Dfile.encoding=UTF-8 -jar webwolf.jar --webgoat.build.version=$1 --server.address=0.0.0.0 > webwolf.log &
|
||||||
|
|
||||||
tail -300f webgoat.log
|
tail -300f webgoat.log
|
||||||
|
Loading…
x
Reference in New Issue
Block a user