Skip to content
Snippets Groups Projects
Dockerfile 709 B
Newer Older
  • Learn to ignore specific revisions
  • Jonas Leder's avatar
    Jonas Leder committed
    # Python support can be specified down to the minor or micro version
    # (e.g. 3.6 or 3.6.3).
    # OS Support also exists for jessie & stretch (slim and full).
    # See https://hub.docker.com/r/library/python/ for all supported Python
    # tags from Docker Hub.
    
    Jonas Leder's avatar
    Jonas Leder committed
    FROM python:3
    
    Jonas Leder's avatar
    Jonas Leder committed
    
    # If you prefer miniconda:
    #FROM continuumio/miniconda3
    
    
    Jonas Leder's avatar
    Jonas Leder committed
    LABEL Name=url_shorter Version=1.1.3
    
    Jonas Leder's avatar
    Jonas Leder committed
    EXPOSE 5000
    
    WORKDIR /app
    
    ADD ./static /app/static
    ADD ./templates /app/templates
    COPY import.py /app/import.py
    
    COPY export.py /app/export.py
    
    COPY main.py /app/main.py
    
    Jonas Leder's avatar
    Jonas Leder committed
    
    
    RUN apt update
    RUN apt upgrade -y
    
    Jonas Leder's avatar
    Jonas Leder committed
    RUN pip install pipreqs
    RUN pipreqs . --force
    RUN python3 -m pip install -r requirements.txt
    RUN date > builddate.txt
    
    
    ENTRYPOINT python3 main.py