blob: 377a7f7c99c9c5dde63dc1a0863a9ab7354da729 [file] [log] [blame]
FROM ubuntu:xenial
WORKDIR /app
# explicitly set user/group IDs
RUN groupadd -r -g 999 sfnotifier \
&& useradd -r -g sfnotifier -u 999 -m -s /sbin/nologin -d /app -c "sf-notifier user" sfnotifier
# Install runtime requirements
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -qq \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends -y -q \
curl \
python2.7 \
python-pip \
python-wheel \
python-setuptools \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY requirements.txt ./
RUN buildDeps="build-essential git python2.7-dev" \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -qq \
&& apt-get install --no-install-recommends -y -q ${buildDeps} \
&& CRYPTOGRAPHY_DONT_BUILD_RUST=1 pip install --no-cache-dir -r /app/requirements.txt \
&& apt-get purge -y ${buildDeps} \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY . .
CMD ./entrypoint.sh