| 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 |