From b22b51009c8cbfcb39fc301ac0f675edf2ef5c92 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 15 Oct 2022 23:55:13 +0200 Subject: move Dockerfile to docker/ --- docker/Dockerfile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 docker/Dockerfile (limited to 'docker/Dockerfile') diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..9b9a8f6 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,28 @@ +FROM alpine:3.15 AS base + +FROM base AS build + +RUN apk add --no-cache gcc libffi-dev make musl-dev python3-dev py3-pip + +COPY ["requirements.txt", "/tmp/"] +RUN pip3 install --no-cache-dir --target=/deps -r /tmp/requirements.txt + +FROM base + +LABEL maintainer="Egor Tensin " + +RUN apk add --no-cache bash git openssh-client python3 tini + +COPY --from=build ["/deps", "/deps/"] +ENV PYTHONPATH="/deps" + +ARG ssh_sock_dir=/ +ARG ssh_sock_path="$ssh_sock_dir/ssh-agent.sock" +ENV SSH_AUTH_SOCK "$ssh_sock_path" + +COPY ["docker/entrypoint.sh", "/"] +COPY ["cgitize/", "/usr/src/cgitize/"] +WORKDIR /usr/src + +ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"] +CMD ["python3", "-m", "cgitize.main"] -- cgit v1.2.3