In this video we will learn about how to create a docker container from a flask app.
we will take an existing flask app and make a docker image from it. we will create a docker file and then use alpine image and python3 and pip to create docker container.
we will use various docker command line RUN, WORKDIR, FROM ,EXPOSE, ENTRYPOINT, CMD
from alpine:latest
RUN apk add –no-cache python3-dev
&& pip3 install –upgrade pip
WORKDIR /app
COPY . /app
RUN pip3 –no-cache-dir install -r requirements.txt
EXPOSE 5000
ENTRYPOINT [“python3”]
CMD [“app.py”]
Github Repo
=============================
https://github.com/self-tuts/python-flask-docker-image