Update Dockerfile
Browse files- Dockerfile +6 -5
Dockerfile
CHANGED
|
@@ -1,9 +1,10 @@
|
|
| 1 |
FROM golang:1.24 AS builder
|
| 2 |
-
|
|
|
|
|
|
|
| 3 |
|
| 4 |
FROM ubuntu:22.04
|
| 5 |
|
| 6 |
-
# Minimal dependencies only
|
| 7 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 8 |
ca-certificates \
|
| 9 |
python3 \
|
|
@@ -11,12 +12,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 11 |
&& rm -rf /var/lib/apt/lists/* \
|
| 12 |
&& pip3 install --no-cache-dir fastapi uvicorn
|
| 13 |
|
| 14 |
-
COPY --from=builder /go/bin/
|
| 15 |
|
| 16 |
WORKDIR /app
|
| 17 |
COPY app.py .
|
| 18 |
|
| 19 |
EXPOSE 7860
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
CMD ["sh", "-c", "
|
|
|
|
| 1 |
FROM golang:1.24 AS builder
|
| 2 |
+
|
| 3 |
+
# Correct current installation command
|
| 4 |
+
RUN go install gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2/cmd/proxy@latest
|
| 5 |
|
| 6 |
FROM ubuntu:22.04
|
| 7 |
|
|
|
|
| 8 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 9 |
ca-certificates \
|
| 10 |
python3 \
|
|
|
|
| 12 |
&& rm -rf /var/lib/apt/lists/* \
|
| 13 |
&& pip3 install --no-cache-dir fastapi uvicorn
|
| 14 |
|
| 15 |
+
COPY --from=builder /go/bin/proxy /usr/local/bin/
|
| 16 |
|
| 17 |
WORKDIR /app
|
| 18 |
COPY app.py .
|
| 19 |
|
| 20 |
EXPOSE 7860
|
| 21 |
|
| 22 |
+
# Run proxy in background + web server
|
| 23 |
+
CMD ["sh", "-c", "proxy -verbose -relay https://snowflake.torproject.org/ & uvicorn app:app --host 0.0.0.0 --port 7860"]
|