File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,23 +2,22 @@ FROM docker.io/library/python:3.9-alpine
22
33COPY requirements.txt /app/requirements.txt
44
5- ENV PATH="/app/.venv/bin:${PATH}"
6-
75RUN apk add --update --virtual .build-deps \
8- postgresql-dev \
96 gcc \
107 rust \
118 cargo \
9+ postgresql-dev \
1210 libffi-dev \
1311 musl-dev \
1412 openssl-dev \
1513 && python3 -m venv /app/.venv \
14+ && source /app/.venv/bin/activate \
1615 && pip3 install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt \
1716 && runDeps="$( \
18- scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
17+ scanelf --needed --nobanner --format '%n#p' --recursive /app/.venv \
1918 | tr ',' '\n ' \
2019 | sort -u \
21- | awk 'system(" [ -e /usr/local /lib/" $1 " ]") == 0 { next } { print " so:" $1 }' \
20+ | awk 'system(" [ -e /app/.venv /lib/" $1 " ]") == 0 { next } { print " so:" $1 }' \
2221 )" \
2322 && apk add --update --virtual .controller-rundeps \
2423 $runDeps \
@@ -30,6 +29,8 @@ RUN apk add --update --virtual .build-deps \
3029
3130COPY . /app
3231
32+ ENTRYPOINT ["/app/bin/entrypoint" ]
33+
3334WORKDIR /app
3435CMD ["/app/bin/boot" ]
3536EXPOSE 8000
Original file line number Diff line number Diff line change @@ -9,21 +9,22 @@ ENV PATH="/app/.venv/bin:${PATH}"
99
1010RUN echo https://dl-cdn.alpinelinux.org/alpine/edge/testing >>/etc/apk/repositories \
1111 && apk add --update --virtual .build-deps \
12- postgresql-dev \
1312 gcc \
1413 rust \
1514 cargo \
15+ postgresql-dev \
1616 libffi-dev \
1717 musl-dev \
18- openldap -dev \
18+ openssl -dev \
1919 && python3 -m venv /app/.venv \
20+ && source /app/.venv/bin/activate \
2021 && pip3 install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt \
2122 && pip3 install --disable-pip-version-check --no-cache-dir -r /app/dev_requirements.txt \
2223 && runDeps="$( \
23- scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
24+ scanelf --needed --nobanner --format '%n#p' --recursive /app/.venv \
2425 | tr ',' '\n' \
2526 | sort -u \
26- | awk 'system("[ -e /usr/local /lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
27+ | awk 'system("[ -e /app/.venv /lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
2728 )" \
2829 && apk add --update --virtual .controller-rundeps \
2930 $runDeps \
@@ -43,6 +44,8 @@ RUN echo https://dl-cdn.alpinelinux.org/alpine/edge/testing >>/etc/apk/repositor
4344
4445COPY . /app
4546
47+ ENTRYPOINT ["/app/bin/entrypoint"]
48+
4649WORKDIR /app
4750CMD ["/app/bin/boot"]
4851EXPOSE 8000
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # shellcheck disable=SC1090,SC1091
3+
4+ set -e
5+ source /app/.venv/bin/activate
6+ exec " $@ "
You can’t perform that action at this time.
0 commit comments