-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.ci
60 lines (47 loc) · 1.71 KB
/
Dockerfile.ci
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM python:3.13-bookworm
LABEL org.opencontainers.image.authors="Rainer Poisel <rainer@honeytreelabs.com>"
ARG USER_ID=1000
ARG GROUP_ID=1000
ARG DOCKER_GID=997
RUN groupadd -g ${GROUP_ID} user \
&& useradd -u ${USER_ID} -g ${GROUP_ID} -m user \
&& (groupadd -g ${DOCKER_GID} docker || true) \
&& usermod -aG ${DOCKER_GID} user
RUN <<EOT
apt-get update -qy
apt-get install -qyy \
-o APT::Install-Recommends=false \
-o APT::Install-Suggests=false \
bind9-dnsutils \
iproute2 \
iputils-ping \
jq \
openvpn \
qemu-system-arm \
qemu-system-x86 \
ser2net \
telnet
EOT
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get install -yy ca-certificates curl \
&& install -m 0755 -d /etc/apt/keyrings \
&& curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc \
&& chmod a+r /etc/apt/keyrings/docker.asc \
&& echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null \
&& apt-get update \
&& apt-get install -yy docker-ce-cli docker-compose-plugin
ENV PATH="/home/user/.local/bin:/workspace/.venv/bin:${PATH}"
COPY --from=ghcr.io/astral-sh/uv:latest /uv /home/user/.local/bin/uv
RUN mkdir /workspace
# copy git repository into container to make setup more portable
# this is especially needed for using docker in docker
COPY . /workspace
WORKDIR /workspace
# COPY ./requirements.txt /requirements.txt
RUN --mount=type=cache,target=/root/.cache <<EOT
uv sync --link-mode=copy
EOT
CMD ["sleep", "infinity" ]