Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ondiekelijah/flask-docker-app
A quick guide on how to Dockerize a flask application.
https://github.com/ondiekelijah/flask-docker-app
docker-containers docker-engine docker-image flask
Last synced: 4 days ago
JSON representation
A quick guide on how to Dockerize a flask application.
- Host: GitHub
- URL: https://github.com/ondiekelijah/flask-docker-app
- Owner: ondiekelijah
- License: mit
- Created: 2021-11-10T10:00:57.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-11T18:55:14.000Z (about 3 years ago)
- Last Synced: 2025-01-21T21:02:21.538Z (12 days ago)
- Topics: docker-containers, docker-engine, docker-image, flask
- Language: Dockerfile
- Homepage:
- Size: 16.6 KB
- Stars: 30
- Watchers: 1
- Forks: 356
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flask-Docker-App
## Set up & Installation.
### 1 .Clone/Fork the git repo and create a virtual environment
**Windows**
```bash
git clone https://github.com/Dev-Elie/Flask-Docker-App.git
cd Flask-Docker-App
py -3 -m venv venv```
**macOS/Linux**
```bash
git clone https://github.com/Dev-Elie/Flask-Docker-App.git
cd Flask-Docker-App
python3 -m venv venv```
### 2 .Activate the environment
**Windows**```venv\Scripts\activate```
**macOS/Linux**```. venv/bin/activate```
or
```source venv/bin/activate```### 3 .Install the requirements
Applies for windows/macOS/Linux
```
pip install -r requirements.txt
```### 5. Run the application
`python app.py`# OR
## Create a new application from scratch
### 1. Create a directory with a name **"Flask-Docker-App"**
`mkdir Flask-Docker-App`### 2. Navigate to the newly created directory
`cd Flask-Docker-App`
### 3. Create a virtual environment
**Windows**
`py -3 -m venv venv`
**macOS/Linux**
`python3 -m venv venv`
### 4. Activate the environment
**Windows**```venv\Scripts\activate```
**macOS/Linux**```. venv/bin/activate```
or
```source venv/bin/activate```### 3 .Install Flask
`pip install Flask`
### 4. Create the required files
Create two files; **app.py** and **Dockerfile**`touch app.py Dockerfile`
## Congratulations! You can now proceed with the article on Dockerizing a Flask app [here](https://www.freecodecamp.org/news/how-to-dockerize-a-flask-app/).
Follow me on Twitter