Commit 9c09d96e authored by Ridhwan Ikhwanto's avatar Ridhwan Ikhwanto
Browse files

Fix merging Dockerfile

parents 59eee7db 43d520ce
FROM alpine:3.14
RUN apk --no-cache add --update go wget tar \
&& wget https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v1.1.0/snowflake-v1.1.0.tar.bz2 \
&& tar xjf snowflake-v1.1.0.tar.bz2 \
&& cd snowflake-v1.1.0/proxy \
&& go get && GO111MODULE=on go build -o proxy . \
&& mv proxy /usr/local/bin/ \
&& go clean -r -cache -modcache \
&& cd ../.. \
&& rm -rf snowflake \
&& rm snowflake-v1.1.0.tar.bz2 \
&& apk del go wget tar
FROM alpine:3.14 AS builder
RUN apk add --update go git
WORKDIR /builder
RUN git clone -b v1.1.0 https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/
WORKDIR /builder/snowflake/proxy
RUN go get
RUN go build -o proxy .
ENTRYPOINT [ "proxy" ]
FROM alpine:3.14
COPY --from=builder /builder/snowflake/proxy/proxy /proxy
ENTRYPOINT [ "/proxy" ]
#### To run this docker container:
## To run this docker container:
```
docker-compose up -d
```
#### Releasing a new image
## Releasing a new image
First, build the image:
```
make build
......@@ -22,10 +22,36 @@ git tag -a -s "vVERSION" -m "Docker image version VERSION"
git push --tags origin main
```
#### Adding Custom URLs:
To add custom URLs before building the image change the URLs in ENTRYPOINT to your desired URLs. Default URLs are shown below.
## Adding custom options:
To use custom options when running this image you can add them to `command:` line in the docker-compose.yml like this:
``` dockerfile
ENTRYPOINT [ "proxy" , "--broker" , "https://snowflake-broker.torproject.net/" , "--relay" , "wss://snowflake.torproject.net/" ]
command: [ "-broker" , "https://snowflake-broker.torproject.net/" ]
```
so the full docker-compose.yml looks something like this:
version: "3.8"
services:
snowflake-proxy:
network_mode: host
image: thetorproject/snowflake-proxy:latest
container_name: snowflake-proxy
restart: unless-stopped
command: [ "-broker" , "https://snowflake-broker.torproject.net/" ]
### Available options:
-broker string
broker URL (default "https://snowflake-broker.bamsoftware.com/")
-capacity uint
maximum concurrent clients
-keep-local-addresses
keep local LAN address ICE candidates
-log string
log filename
-relay string
websocket relay URL (default "wss://snowflake.bamsoftware.com/")
-stun string
stun URL (default "stun:stun.stunprotocol.org:3478")
-unsafe-logging
prevent logs from being scrubbed
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment