Sign inSign up

bbacem/python-flask

By bbacem

Updated over 3 years ago

Image
0

915

bbacem/python-flask repository overview

Flask Docker Image

This Docker image contains a preinstalled version of Flask, a popular Python web framework. You can use this image to quickly and easily set up a Flask application, without having to worry about installing Flask and its dependencies.

Usage

To use this image, you can create a new Dockerfile that starts with this image as a base. For example:

FROM bbacem/python-flask:latest

# Copy your Flask application code into the container
COPY app.py /app

# Expose port 5000 for the Flask application
EXPOSE 5000

# Start the Flask application when the container launches
CMD ["python", "app.py"]

In this example, we start with the bbacem/python-flask image as a base, copy our Flask application code into the container, expose port 5000 for the Flask application, and then start the application using CMD.

After creating your Dockerfile, you can build your image using the docker build command: docker build -t my-flask-app .

Once the build is complete, you can run the container using the docker run command:

docker run -p 5000:5000 my-flask-app This will run your Flask application on port 5000 on your local machine, accessible at http://localhost:5000/.

Versions This image is based on the official Python Docker image, and includes the latest version of Flask at the time of the image build. The version of Python used in the image can be found in the image tags:

bbacem/python-flask:latest - latest Python and Flask version. License This image is licensed under the MIT License. Please see the LICENSE file for more information.

Tag summary

Content type

Image

Digest

sha256:deab929f0

Size

328.8 MB

Last updated

over 3 years ago

docker pull bbacem/python-flask