mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-12 09:00:40 +00:00
Load environment variables in container. So the python-dotenv module is no longer needed!
This commit is contained in:
38
Dockerfile
38
Dockerfile
@ -1,18 +1,30 @@
|
||||
# pull official base image
|
||||
FROM python:3.6.9
|
||||
FROM python:3.6-alpine
|
||||
|
||||
# set environment varibles
|
||||
ENV PYTHONDONTWRITEBYTECODE 1
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
# set work directory
|
||||
WORKDIR /opaque
|
||||
RUN apk add build-base
|
||||
|
||||
# Copy the current directory contents into the container at /daemon
|
||||
COPY . /opaque
|
||||
|
||||
# Install requirements
|
||||
RUN pip install --trusted-host pypi.python.org -r requirements.txt
|
||||
RUN adduser -D opaque
|
||||
USER opaque
|
||||
|
||||
# set permissions for entrypoint
|
||||
RUN chmod a+x flask-entrypoint.sh
|
||||
|
||||
WORKDIR /home/opaque
|
||||
|
||||
|
||||
COPY app app
|
||||
COPY migrations migrations
|
||||
COPY opaque.py config.py ./
|
||||
COPY requirements.txt requirements.txt
|
||||
|
||||
|
||||
RUN python -m venv venv && \
|
||||
venv/bin/pip install -r requirements.txt
|
||||
|
||||
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
|
Reference in New Issue
Block a user