docker-vulnerable-dvwa/Dockerfile

32 lines
808 B
Docker
Raw Normal View History

2016-12-02 19:19:11 +00:00
FROM debian:jessie
2016-08-09 14:40:03 +00:00
2017-09-09 21:48:08 +00:00
LABEL maintainer "opsxcq@strm.sh"
2016-08-09 14:40:03 +00:00
2016-12-02 19:19:11 +00:00
RUN apt-get update && \
2017-01-02 20:04:48 +00:00
apt-get upgrade -y && \
2016-12-02 19:19:11 +00:00
DEBIAN_FRONTEND=noninteractive apt-get install -y \
2017-01-02 21:03:54 +00:00
debconf-utils && \
echo mysql-server-5.5 mysql-server/root_password password vulnerables | debconf-set-selections && \
echo mysql-server-5.5 mysql-server/root_password_again password vulnerables | debconf-set-selections && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
2017-01-02 20:01:17 +00:00
apache2 \
mysql-server \
php5 \
php5-mysql \
php-pear \
php5-gd \
&& \
2016-12-02 19:19:11 +00:00
apt-get clean && \
rm -rf /var/lib/apt/lists/*
2016-08-09 14:40:03 +00:00
2017-01-02 20:21:30 +00:00
COPY php.ini /etc/php5/apache2/php.ini
2017-01-02 20:01:17 +00:00
COPY dvwa /var/www/html
2016-08-09 14:40:03 +00:00
2017-01-02 20:01:17 +00:00
RUN chown www-data:www-data -R /var/www/html && \
rm /var/www/html/index.html
2016-08-09 14:40:03 +00:00
2016-12-02 19:19:11 +00:00
EXPOSE 80
2016-08-09 14:40:03 +00:00
2017-01-02 20:01:17 +00:00
COPY main.sh /
ENTRYPOINT ["/main.sh"]