mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Update snowflake proxy image to use most recent golang and geodb
This commit is contained in:
parent
a9fe899198
commit
8ae1994e4b
1 changed files with 28 additions and 5 deletions
33
Dockerfile
33
Dockerfile
|
@ -1,6 +1,5 @@
|
||||||
FROM docker.io/library/golang:1.23-bookworm AS build
|
FROM docker.io/library/golang:latest AS build
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y tor-geoipdb
|
|
||||||
|
|
||||||
ADD . /app
|
ADD . /app
|
||||||
|
|
||||||
|
@ -8,11 +7,35 @@ WORKDIR /app/proxy
|
||||||
RUN go get
|
RUN go get
|
||||||
RUN CGO_ENABLED=0 go build -o proxy -ldflags '-extldflags "-static" -w -s' .
|
RUN CGO_ENABLED=0 go build -o proxy -ldflags '-extldflags "-static" -w -s' .
|
||||||
|
|
||||||
|
FROM containers.torproject.org/tpo/tpa/base-images/debian:bookworm as debian-base
|
||||||
|
|
||||||
|
# Install dependencies to add Tor's repository.
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
curl \
|
||||||
|
gpg \
|
||||||
|
gpg-agent \
|
||||||
|
ca-certificates \
|
||||||
|
libcap2-bin \
|
||||||
|
--no-install-recommends
|
||||||
|
|
||||||
|
# See: <https://2019.www.torproject.org/docs/debian.html.en>
|
||||||
|
RUN curl https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import
|
||||||
|
RUN gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
|
||||||
|
|
||||||
|
RUN printf "deb https://deb.torproject.org/torproject.org bookworm main\n" >> /etc/apt/sources.list.d/tor.list
|
||||||
|
|
||||||
|
# Install remaining dependencies.
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
tor \
|
||||||
|
tor-geoipdb \
|
||||||
|
--no-install-recommends
|
||||||
|
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
|
|
||||||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
COPY --from=debian-base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||||
COPY --from=build /usr/share/zoneinfo /usr/share/zoneinfo
|
COPY --from=debian-base /usr/share/zoneinfo /usr/share/zoneinfo
|
||||||
COPY --from=build /usr/share/tor/geoip* /usr/share/tor/
|
COPY --from=debian-base /usr/share/tor/geoip* /usr/share/tor/
|
||||||
COPY --from=build /app/proxy/proxy /bin/proxy
|
COPY --from=build /app/proxy/proxy /bin/proxy
|
||||||
|
|
||||||
ENTRYPOINT [ "/bin/proxy" ]
|
ENTRYPOINT [ "/bin/proxy" ]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue