diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..04dfa73 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Use the official Python 3 image as the base image +FROM python:3 + +# Set the working directory to /app +WORKDIR /app + +# Copy the requirements.txt file to the working directory +COPY requirements.txt . + +# Install the dependencies using pip install -r requirements.txt +RUN pip install -r requirements.txt + +# Copy the rest of the application files to the working directory +COPY . . + +# Set the entry point to run vulnerable-flask-app-linux.py +ENTRYPOINT ["python", "vulnerable-flask-app-linux.py"] + +# Expose port 8081 +EXPOSE 8081 diff --git a/README.md b/README.md index 2581483..048e84a 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,17 @@ git clone https://github.com/videvelopers/Vulnerable-Flask-App.git cd Vulnerable-Flask-App 3. Run the Flask application. +### Docker + +1. Clone this repository to your local machine. +git clone https://github.com/videvelopers/Vulnerable-Flask-App.git +2. Navigate to the cloned directory. +cd Vulnerable-Flask-App +3. Build the Docker image. +docker build -t vulnerable-flask-app . +4. Run the Docker container. +docker run -p 8081:8081 vulnerable-flask-app + # Disclaimer **This application is for educational purposes only. Use it at your own risk. The author is not responsible for any damage caused by this application. Do not run this application on a production server.** @@ -65,5 +76,3 @@ cd Vulnerable-Flask-App [ salman@videvelopers.com](salman@videvelopers.com) [blog](st-tlc.blogspot.com) - -