To create a custom Docker image based on the linuxserver/webtop:fedora-kde image, incorporating Java JDK, Python 3.11, and configuring Burp Suite Professional with persistent activation, follow these steps:
Step 1: Create a Dockerfile
Create a new directory on your local machine and create a file named Dockerfile inside it. Paste the following content into the Dockerfile:
# Use the base image
FROM lscr.io/linuxserver/webtop:fedora-kde
# Install Java JDK 17
RUN dnf install -y java-17-openjdk-devel
# Install Python 3.11 alongside existing Python
RUN dnf install -y python3.11
# Update alternatives to point python3 to python3.11
RUN alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
# Ensure /config/.BurpSuite points to /persistence/.BurpSuite for persistent activation data
RUN rm -rf /config/.BurpSuite && \
ln -s /persistence/.BurpSuite /config/.BurpSuite
# Set the working directory to where Burp Suite Pro is located
WORKDIR /persistence/BurpSuitePro
# Command to start Burp Suite Pro using Java
CMD ["java", "-jar", "burpsuite_pro.jar"]
Explanation of the Dockerfile:
- Base Image: Uses
linuxserver/webtop:fedora-kde as the starting point.
- Java Installation: Installs Java JDK 17 needed to run Burp Suite.
- Python Installation: Installs Python 3.11 and sets it as the default
python3.
- Persistent Activation Data: Removes any existing
.BurpSuite directory in /config and creates a symbolic link to /persistence/.BurpSuite. This ensures activation data persists across container restarts.
- Working Directory: Sets
/persistence/BurpSuitePro as the working directory where burpsuite_pro.jar is located.
- Startup Command: Configures the container to run Burp Suite Pro on startup.
Step 2: Build the Docker Image
Open a terminal in the directory containing your Dockerfile and run the following command to build your Docker image:
docker build -t your_dockerhub_username/burpsuite-webtop:latest .
Replace your_dockerhub_username with your actual Docker Hub username or your preferred registry.
Step 3: Test the Docker Image Locally (Optional)
Before deploying to Azure, you might want to test the image locally:
docker run -it --rm \
-v /path/to/your/local/persistence:/persistence \
your_dockerhub_username/burpsuite-webtop:latest
Replace /path/to/your/local/persistence with the path to the directory containing your BurpSuitePro folder and .BurpSuite directory.
Step 4: Push the Docker Image to a Registry
Login to your Docker registry (e.g., Docker Hub):
docker login
Then push your image:
docker push your_dockerhub_username/burpsuite-webtop:latest
Alternatively, if using Azure Container Registry (ACR), tag and push your image accordingly:
docker tag burpsuite-webtop:latest your_acr_name.azurecr.io/burpsuite-webtop:latest
docker push your_acr_name.azurecr.io/burpsuite-webtop:latest
Step 5: Configure Azure Container Apps
When deploying your container to Azure Container Apps, make sure to:
- Set the Image: Use the image you pushed to your registry.
- Mount Persistent Storage:
- Azure Files Share: Mount your Azure Files share to
/persistence in the container.
- Ensure Files Exist: Your Azure Files share should contain:
/persistence/BurpSuitePro/burpsuite_pro.jar
/persistence/.BurpSuite directory (from your initial activation)
- Configure Permissions: The container runs as user
abc (UID 1000), so ensure the files in /persistence are accessible by this user.
Additional Notes:
- Persistent Activation: By linking
/config/.BurpSuite to /persistence/.BurpSuite, the activation data is stored persistently. This means you won't need to re-enter your license key after restarting the container.
- Python Version: Installing Python 3.11 and setting it as the default ensures your code that requires Python 3.11 runs correctly.
- Java Installation: Burp Suite Pro requires Java to run, so installing Java JDK 17 meets this dependency.
Summary:
By following these steps, you'll create a Docker image that:
- Is based on the
linuxserver/webtop:fedora-kde image.
- Installs Java JDK 17 and Python 3.11.
- Configures the container to run Burp Suite Pro on startup.
- Ensures Burp Suite activation data persists across container restarts.
- Provides the necessary environment for your code that depends on Python 3.11.
Ensure to test your container thoroughly to confirm that it meets all your requirements and make any adjustments as necessary.