Overview
This page covers issues specific to running DVWA in Docker containers, including port conflicts, log access, and MariaDB memory issues.Prerequisites
Before troubleshooting, ensure you have Docker and Docker Compose properly installed:Common Docker Issues
How to access container logs
How to access container logs
Using Docker Desktop (GUI)
If you are using Docker Desktop, logs can be accessed from the graphical application. Some minor details may change with newer versions, but the access method should be the same.- Open Docker Desktop
- Navigate to the Containers section
- Find the DVWA containers
- Click on the container to view its logs
Using Terminal
Logs can also be accessed from the terminal.Step 1: Open a terminal and change its working directory to DVWAStep 2: Show the merged logsRunning DVWA on a different port
Running DVWA on a different port
Why Not Port 80 by Default?
DVWA uses port 4280 by default instead of port 80 for a few reasons:- Some users might already be running something on port 80
- Some users might be using a rootless container engine (like Podman), and 80 is a privileged port (< 1024). Additional configuration (e.g. setting
net.ipv4.ip_unprivileged_port_start) is required
For running DVWA in containers, the web server listens on port 4280 instead of the usual port 80.
Changing the Port
You can expose DVWA on a different port by changing the port binding in thecompose.yml file.Example: Change from port 4280 to port 8806Before:http://localhost:8806.Network Access Warning
Example for network access:Disable Auto-Start Temporarily
If you want to disable this behavior temporarily:Option 1: Using Docker Composedocker compose down will delete the containers, while docker compose stop will just stop them.MariaDB container does not start - Memory issues
MariaDB container does not start - Memory issues
Error Message
If you see the following error in the Docker logs while trying to start MariaDB:The Problem
This is likely due to the host machine not having enough memory.Solutions
Solution 1: Increase Memory (Recommended)If you are using this in a hosted environment, the best solution is to step up a machine size to get more memory and try again.Solution 2: Add Volume MappingYou might also need to add the following line to the volumes section of yourcompose.yml file:Local build and development
Local build and development
Building from Local Changes
If you made local changes and want to build the project from local:Step 1: Go tocompose.yml and change:Docker Support
We provide support for the latest Docker release. If you are using Linux and the Docker package that came with your package manager, it will probably work too, but support will only be best-effort.
Upgrading Docker
Upgrading Docker from the package manager version to upstream requires that you uninstall the old versions. See Docker’s manuals for: Your Docker data (containers, images, volumes, etc.) should not be affected, but if you do run into a problem:- Contact Docker Support
- Use search engines in the meantime
Getting Started with Docker
DVWA is available as a pre-built Docker image. For more information, you can browse the prebuilt Docker images. To get started:- Clone or download the DVWA repository
- Open a terminal and change to the DVWA directory
- Run:
