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

Add Dockerfile to deploy the app #1

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.**
Expand All @@ -65,5 +76,3 @@ cd Vulnerable-Flask-App
[ salman@videvelopers.com](salman@videvelopers.com)

[blog](st-tlc.blogspot.com)