2020-03-03 13:10:09 +01:00
|
|
|
ARG DEBIAN_RELEASE=buster
|
|
|
|
FROM debian:$DEBIAN_RELEASE
|
2019-07-05 21:23:24 +02:00
|
|
|
LABEL maintainer="Jan Dittberner <jan@dittberner.info>"
|
2018-11-19 23:28:40 +01:00
|
|
|
|
2020-03-03 13:10:09 +01:00
|
|
|
ENV LC_ALL=C.UTF-8
|
|
|
|
ENV LANG=C.UTF-8
|
|
|
|
|
2018-11-19 23:28:40 +01:00
|
|
|
RUN apt-get update \
|
|
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
2019-07-05 21:23:24 +02:00
|
|
|
build-essential \
|
2018-11-19 23:28:40 +01:00
|
|
|
dumb-init \
|
|
|
|
gettext \
|
|
|
|
git \
|
|
|
|
python3-dev \
|
|
|
|
python3-pip \
|
2020-03-02 16:49:23 +01:00
|
|
|
python3-setuptools \
|
2020-03-03 13:10:09 +01:00
|
|
|
python3-virtualenv \
|
2020-03-02 16:49:23 +01:00
|
|
|
python3-wheel \
|
2018-11-19 23:28:40 +01:00
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*.*
|
|
|
|
|
2020-03-03 13:10:09 +01:00
|
|
|
RUN python3 -m pip install --prefix=/usr/local pipenv
|
2018-11-19 23:28:40 +01:00
|
|
|
|
2020-03-03 13:10:09 +01:00
|
|
|
RUN apt-get update \
|
|
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
|
|
libpq-dev \
|
|
|
|
postgresql-client \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*.*
|
|
|
|
|
|
|
|
ARG GVAGID=2000
|
|
|
|
ARG GVAUID=2000
|
2018-11-19 23:28:40 +01:00
|
|
|
|
2020-03-03 13:10:09 +01:00
|
|
|
ARG GVAAPP=gva
|
2018-11-19 23:28:40 +01:00
|
|
|
|
2020-03-03 13:10:09 +01:00
|
|
|
VOLUME /srv/$GVAAPP/media /srv/$GVAAPP/static
|
2018-11-19 23:28:40 +01:00
|
|
|
|
2020-03-03 13:10:09 +01:00
|
|
|
WORKDIR /srv/$GVAAPP
|
2018-11-19 23:28:40 +01:00
|
|
|
|
2020-03-03 13:10:09 +01:00
|
|
|
COPY Pipfile Pipfile.lock /srv/$GVAAPP/
|
|
|
|
|
|
|
|
RUN addgroup --gid $GVAGID $GVAAPP ; \
|
|
|
|
adduser --home /home/$GVAAPP --shell /bin/bash --uid $GVAUID --gid $GVAGID --disabled-password --gecos "User for gnuviechadmin component $GVAAPP" $GVAAPP
|
|
|
|
|
|
|
|
USER $GVAAPP
|
|
|
|
RUN python3 -m virtualenv --python=python3 /home/$GVAAPP/$GVAAPP-venv ; \
|
|
|
|
/home/$GVAAPP/$GVAAPP-venv/bin/python3 -m pip install -U pip ; \
|
|
|
|
VIRTUAL_ENV=/home/$GVAAPP/$GVAAPP-venv pipenv install --deploy --ignore-pipfile --dev
|
|
|
|
|
|
|
|
VOLUME /srv/$GVAAPP
|
2019-07-05 21:23:24 +02:00
|
|
|
|
2018-11-19 23:28:40 +01:00
|
|
|
EXPOSE 8000
|
|
|
|
|
2020-03-03 13:10:09 +01:00
|
|
|
COPY gva.sh /srv/
|
|
|
|
|
|
|
|
ENTRYPOINT ["dumb-init", "/srv/gva.sh"]
|