Files
.github
.mvn
config
docker
Dockerfile
Readme.md
index.html
nginx.conf
pom.xml
start.sh
docs
webgoat-container
webgoat-integration-tests
webgoat-lessons
webgoat-server
webwolf
.editorconfig
.gitignore
CODE_OF_CONDUCT.md
CONTRIBUTING.md
COPYRIGHT.txt
CREATE_RELEASE.md
LICENSE.txt
PULL_REQUEST_TEMPLATE.md
README.md
RELEASE_NOTES.md
mvn-debug
mvnw
mvnw.cmd
pom.xml
WebGoat/docker/Dockerfile
2021-12-19 13:49:38 +01:00

23 lines
611 B
Docker

FROM eclipse-temurin:17_35-jdk-focal
RUN apt-get update
RUN useradd -ms /bin/bash webgoat
RUN apt-get -y install apt-utils nginx
RUN chgrp -R 0 /home/webgoat
RUN chmod -R g=u /home/webgoat
USER webgoat
COPY --chown=webgoat nginx.conf /etc/nginx/nginx.conf
COPY --chown=webgoat index.html /usr/share/nginx/html/
COPY --chown=webgoat target/webgoat-server-*.jar /home/webgoat/webgoat.jar
COPY --chown=webgoat target/webwolf-*.jar /home/webgoat/webwolf.jar
COPY --chown=webgoat start.sh /home/webgoat
RUN chmod +x /home/webgoat/start.sh
EXPOSE 8080
EXPOSE 9090
WORKDIR /home/webgoat
ENTRYPOINT ["./start.sh"]