aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Dockerfile
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-04-09 20:02:57 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2022-04-09 20:02:57 +0200
commit67aa8f5f6699e0d7a48aaa164aa0f3126855f6c7 (patch)
tree720c616663a67006d3717e92c8d5ffa3c57f5926 /Dockerfile
parentfrontend: pip -> pip3 for consistency (diff)
downloadcgitize-67aa8f5f6699e0d7a48aaa164aa0f3126855f6c7.tar.gz
cgitize-67aa8f5f6699e0d7a48aaa164aa0f3126855f6c7.zip
docker: use pip install --target
Diffstat (limited to '')
-rw-r--r--Dockerfile7
1 files changed, 3 insertions, 4 deletions
diff --git a/Dockerfile b/Dockerfile
index d540a02..9b9a8f6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -5,9 +5,7 @@ FROM base AS build
RUN apk add --no-cache gcc libffi-dev make musl-dev python3-dev py3-pip
COPY ["requirements.txt", "/tmp/"]
-RUN python3 -m venv /tmp/venv && \
- . /tmp/venv/bin/activate && \
- python3 -m pip install -r /tmp/requirements.txt
+RUN pip3 install --no-cache-dir --target=/deps -r /tmp/requirements.txt
FROM base
@@ -15,7 +13,8 @@ LABEL maintainer="Egor Tensin <Egor.Tensin@gmail.com>"
RUN apk add --no-cache bash git openssh-client python3 tini
-COPY --from=build ["/tmp/venv", "/tmp/venv/"]
+COPY --from=build ["/deps", "/deps/"]
+ENV PYTHONPATH="/deps"
ARG ssh_sock_dir=/
ARG ssh_sock_path="$ssh_sock_dir/ssh-agent.sock"