Skip to content

This repository is about creating a docker image for flask container

Notifications You must be signed in to change notification settings

oskarsh/python-flask-docker-image

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git clone the application

Create a virtual environment inside the application

    virtualenv -p /usr/bin/python3 venv    

    source venv/bin/activate

Install Python modules

   pip3 install -r requirements.txt 
    

Run the application using

    python app.py

You will get below REST API

        http://localhost:5000

Docker commands

    
        // List all running container
        docker ps

        // list all containers
        docker ps -a


        // list all docker images
        docker images

        // build a docker image
        docker build -t <imageName:version> dockerFilePath

        
        // run a docker container in daemon mode with ports exposed
        docker run -it -d -p <outsidePort>:<dockerInsidePort> <imageName:version>



About

This repository is about creating a docker image for flask container

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 79.5%
  • Dockerfile 20.5%