Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Dockerfile for testing purpose and original code is commented… #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 48 additions & 35 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,38 +1,51 @@
FROM debian:9.2

LABEL maintainer "[email protected]"

RUN apt-get update && \
apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
debconf-utils && \
echo mariadb-server mysql-server/root_password password vulnerables | debconf-set-selections && \
echo mariadb-server mysql-server/root_password_again password vulnerables | debconf-set-selections && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
apache2 \
mariadb-server \
php \
php-mysql \
php-pgsql \
php-pear \
php-gd \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

COPY php.ini /etc/php5/apache2/php.ini
COPY dvwa /var/www/html

COPY config.inc.php /var/www/html/config/

RUN chown www-data:www-data -R /var/www/html && \
rm /var/www/html/index.html

RUN service mysql start && \
sleep 3 && \
mysql -uroot -pvulnerables -e "CREATE USER app@localhost IDENTIFIED BY 'vulnerables';CREATE DATABASE dvwa;GRANT ALL privileges ON dvwa.* TO 'app'@localhost;"
#Getting base image ubuntu
FROM ubuntu:latest
LABEL MAINTAINER "Amit Kumar"

ENV AWS ACCESS KEYS AKIA6FVCVEBLGJXC7VSX
ENV SSN 092-30-2294
ENV Credit card numbers 3782-8224-6310-0456

RUN apt-get update

EXPOSE 80

COPY main.sh /
ENTRYPOINT ["/main.sh"]
CMD ["echo", "This image contains sensetive data"]
# FROM debian:9.2

# LABEL maintainer "[email protected]"

# RUN apt-get update && \
# apt-get upgrade -y && \
# DEBIAN_FRONTEND=noninteractive apt-get install -y \
# debconf-utils && \
# echo mariadb-server mysql-server/root_password password vulnerables | debconf-set-selections && \
# echo mariadb-server mysql-server/root_password_again password vulnerables | debconf-set-selections && \
# DEBIAN_FRONTEND=noninteractive apt-get install -y \
# apache2 \
# mariadb-server \
# php \
# php-mysql \
# php-pgsql \
# php-pear \
# php-gd \
# && \
# apt-get clean && \
# rm -rf /var/lib/apt/lists/*

# COPY php.ini /etc/php5/apache2/php.ini
# COPY dvwa /var/www/html

# COPY config.inc.php /var/www/html/config/

# RUN chown www-data:www-data -R /var/www/html && \
# rm /var/www/html/index.html

# RUN service mysql start && \
# sleep 3 && \
# mysql -uroot -pvulnerables -e "CREATE USER app@localhost IDENTIFIED BY 'vulnerables';CREATE DATABASE dvwa;GRANT ALL privileges ON dvwa.* TO 'app'@localhost;"

# EXPOSE 80

# COPY main.sh /
# ENTRYPOINT ["/main.sh"]