-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
36 lines (23 loc) · 886 Bytes
/
Dockerfile
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
# syntax=docker/dockerfile:1
FROM alpine:3.21 AS builder
LABEL org.opencontainers.image.source=https://github.com/altertek/docker-ooni-probe
LABEL org.opencontainers.image.authors=Altertek
ARG PROBEVERSION=v3.24.0
ARG TARGETPLATFORM
ENV TARGETPLATFORM=${TARGETPLATFORM:-"linux/amd64"}
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
RUN apk add --no-cache wget \
&& ARCH=$(echo $TARGETPLATFORM | tr / -) \
&& wget -q --output-document=/root/probe.bin \
"https://github.com/ooni/probe-cli/releases/download/$PROBEVERSION/ooniprobe-$ARCH" \
&& chmod +x /root/probe.bin
FROM alpine:3.21
ARG USER=default
ENV HOME=/home/$USER
COPY --from=builder /root/probe.bin /usr/bin/ooniprobe
RUN adduser -D -g $USER $USER \
&& chown -R $USER:$USER $HOME
USER $USER
WORKDIR $HOME
RUN /usr/bin/ooniprobe onboard --yes
CMD ["/usr/bin/ooniprobe", "run", "unattended", "--batch"]