mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Automatically build container on release and push to our registry.
Now that Tor's gitlab has the container registry enabled, we can build a snowflake container on release, and push the built container to the snowflake registry. This is accomplished without using privileged gitlab runners, via kaniko. This would speed up snowflake updates for people running the docker container. It would also mean that the 'docker-snowflake-proxy' project would no longer need to exist. Fixes docker-snowflake-proxy#10 Fixes docker-snowflake-proxy#13
This commit is contained in:
parent
7b47a7d94b
commit
9175e86321
2 changed files with 30 additions and 0 deletions
18
Dockerfile
Normal file
18
Dockerfile
Normal file
|
@ -0,0 +1,18 @@
|
|||
FROM docker.io/library/golang:1.21 AS build
|
||||
|
||||
LABEL io.containers.autoupdate=registry
|
||||
LABEL org.opencontainers.image.authors="anti-censorship-team@lists.torproject.org"
|
||||
|
||||
ADD . /app
|
||||
|
||||
WORKDIR /app/proxy
|
||||
RUN go get
|
||||
RUN CGO_ENABLED=0 go build -o proxy -ldflags '-extldflags "-static" -w -s' .
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=build /usr/share/zoneinfo /usr/share/zoneinfo
|
||||
COPY --from=build /app/proxy/proxy /bin/proxy
|
||||
|
||||
ENTRYPOINT [ "/bin/proxy" ]
|
Loading…
Add table
Add a link
Reference in a new issue