29 lines
No EOL
858 B
Docker
29 lines
No EOL
858 B
Docker
# Pull the latest stable Python3 Deblian slim image
|
|
FROM python:3-slim-buster
|
|
|
|
# Install OS level required packages
|
|
RUN apt update && apt install -y bash
|
|
|
|
# Install pipenv
|
|
RUN pip install pipenv
|
|
|
|
# Create new user and group and set them
|
|
# This is to keep us from running as "root" inside the container
|
|
# especially since our mounted volutes would then be set to root as the owner
|
|
RUN useradd -Ums /bin/bash -u 991 uwume
|
|
|
|
# Set the current working directory
|
|
# the subdirectories and files here should be mounted using the volume option
|
|
# when executing docker run or by specifying volumes in docker-compose.yml
|
|
WORKDIR /usr/src/uwume
|
|
|
|
RUN chown -R uwume:uwume /usr/src/uwume
|
|
USER uwume
|
|
|
|
# Copy Pipfile from local and install packages
|
|
COPY Pipfile Pipfile
|
|
RUN pipenv install
|
|
|
|
|
|
# Set the entrypoint
|
|
ENTRYPOINT [ "python", "-m", "pipenv", "run", "flask", "run" ] |