vulnapps/apps/mutillidae/database_admin/Dockerfile
Simon Vieille ded6a4f7ab
init
2026-02-11 15:34:31 +01:00

36 lines
2.3 KiB
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Container image: webpwnized/mutillidae:database_admin
# From project root, build with:
# docker build --file .build/database_admin/Dockerfile --tag webpwnized/mutillidae:database_admin .build/database_admin/
# docker build: This is the command to build a Docker image.
# --file .build/database_admin/Dockerfile: This specifies the path to the Dockerfile you want to use. In this case, it's .build/database_admin/Dockerfile.
# --tag webpwnized/mutillidae:database_admin: This tags the resulting Docker image with a name (webpwnized/mutillidae) and a tag (database_admin).
# .: This is the build context. It indicates the directory to be used for the build process. The Docker daemon will send this directory's contents to the Docker engine. In this case, the dot represents the current directory.
#
# From project root, run with:
# docker compose -f .build/docker-compose.yml up --build --detach
# docker-compose: This is the Docker Compose command-line tool used for managing multi-container Docker applications.
# --file .build/docker-compose.yml: This option (--file or -f) specifies the path to the docker-compose.yml file. In this case, its located at .build/docker-compose.yml.
# up: This subcommand tells Docker Compose to create and start the containers defined in the docker-compose.yml file. If the containers do not exist, they will be created. If they already exist, they will be started.
# --detach: This option (--detach or -d) runs the containers in the background (detached mode). When you use this option, Docker Compose will start the containers and return control to the terminal, allowing you to continue using it for other commands or tasks.
# Start with phpmyadmin official image
# Documentation: https://hub.docker.com/_/phpmyadmin
FROM phpmyadmin:latest
# The name of the database container
ENV PMA_HOST="mutillidae_database"
# Create credentials
ENV MYSQL_ROOT_PASSWORD="mutillidae"
ENV PMA_USER="root"
ENV PMA_PASSWORD="mutillidae"
# Try to patch the container but do not fail if patching fails
# Remove the apt-get lists after installation
RUN apt-get update && \
apt-get -y upgrade && \
apt-get -y autoremove && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* || true
# Open port 80 to the webserver
EXPOSE 80