File: Dockerfile.worker

package info (click to toggle)
londiste 3.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 608 kB
  • sloc: python: 4,636; sh: 1,422; makefile: 75; awk: 14; sql: 1
file content (32 lines) | stat: -rw-r--r-- 750 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# only workers

# https://docs.docker.com/engine/reference/builder/

ARG PY=3

FROM python:${PY}-slim-bookworm

ARG PGHOST="db"
ENV PGHOST="${PGHOST}"

WORKDIR /code

RUN set -ex; \
    apt="apt-get -qq -y --no-install-recommends"; \
    ${apt} update; \
    ${apt} install pgqd; \
    adduser --disabled-password --gecos=Replica londiste; \
    rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin; \
    rm -rf /var/lib/apt/lists/*; \
    chown londiste:londiste /code; \
    echo "OK: PY=${PY}"

USER londiste

COPY etc/requirements.txt etc/docker_run.sh etc/

RUN set -ex; \
    pip3 -q --disable-pip-version-check --no-cache-dir install --user -r etc/requirements.txt

ENTRYPOINT ["etc/docker_run.sh"]