LoremPizza commited on
Commit
f9412d6
·
verified ·
1 Parent(s): 3b7b56a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -17
Dockerfile CHANGED
@@ -1,44 +1,33 @@
1
  FROM ubuntu:22.04
2
 
3
  ARG WARP_VERSION
4
- ARG GOST_VERSION
5
  ARG COMMIT_SHA
6
  ARG TARGETPLATFORM
7
 
8
  LABEL org.opencontainers.image.authors="cmj2002"
9
  LABEL org.opencontainers.image.url="https://github.com/cmj2002/warp-docker"
10
  LABEL WARP_VERSION=${WARP_VERSION}
11
- LABEL GOST_VERSION=${GOST_VERSION}
12
  LABEL COMMIT_SHA=${COMMIT_SHA}
13
 
14
  COPY entrypoint.sh /entrypoint.sh
15
  COPY ./healthcheck /healthcheck
16
 
17
- # Install dependencies
18
  RUN case ${TARGETPLATFORM} in \
19
- "linux/amd64") export ARCH="amd64" ;; \
20
- "linux/arm64") export ARCH="armv8" ;; \
21
  *) echo "Unsupported TARGETPLATFORM: ${TARGETPLATFORM}" && exit 1 ;; \
22
  esac && \
23
- echo "Building for ${ARCH} with GOST ${GOST_VERSION}" && \
24
  apt-get update && \
25
  apt-get upgrade -y && \
26
- apt-get install -y curl gnupg lsb-release sudo jq ipcalc file && \
27
  curl https://pkg.cloudflareclient.com/pubkey.gpg | gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg && \
28
  echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/cloudflare-client.list && \
29
  apt-get update && \
30
  apt-get install -y cloudflare-warp && \
31
  apt-get clean && \
32
  apt-get autoremove -y && \
33
- curl -LO https://github.com/ginuerzh/gost/releases/download/v${GOST_VERSION}/gost-linux-${ARCH}-${GOST_VERSION}.gz && \
34
- if file gost-linux-${ARCH}-${GOST_VERSION}.gz | grep -q 'gzip compressed data'; then \
35
- gunzip gost-linux-${ARCH}-${GOST_VERSION}.gz; \
36
- else \
37
- echo "Downloaded file is not a valid gzip file"; \
38
- exit 1; \
39
- fi && \
40
- mv gost-linux-${ARCH}-${GOST_VERSION} /usr/bin/gost && \
41
- chmod +x /usr/bin/gost && \
42
  chmod +x /entrypoint.sh && \
43
  chmod +x /healthcheck/index.sh && \
44
  useradd -m -s /bin/bash warp && \
@@ -50,7 +39,6 @@ USER warp
50
  RUN mkdir -p /home/warp/.local/share/warp && \
51
  echo -n 'yes' > /home/warp/.local/share/warp/accepted-tos.txt
52
 
53
- ENV GOST_ARGS="-L :1080"
54
  ENV WARP_SLEEP=2
55
 
56
  HEALTHCHECK --interval=15s --timeout=5s --start-period=10s --retries=3 \
 
1
  FROM ubuntu:22.04
2
 
3
  ARG WARP_VERSION
 
4
  ARG COMMIT_SHA
5
  ARG TARGETPLATFORM
6
 
7
  LABEL org.opencontainers.image.authors="cmj2002"
8
  LABEL org.opencontainers.image.url="https://github.com/cmj2002/warp-docker"
9
  LABEL WARP_VERSION=${WARP_VERSION}
 
10
  LABEL COMMIT_SHA=${COMMIT_SHA}
11
 
12
  COPY entrypoint.sh /entrypoint.sh
13
  COPY ./healthcheck /healthcheck
14
 
15
+ # install dependencies
16
  RUN case ${TARGETPLATFORM} in \
17
+ "linux/amd64") export ARCH="amd64" ;; \
18
+ "linux/arm64") export ARCH="armv8" ;; \
19
  *) echo "Unsupported TARGETPLATFORM: ${TARGETPLATFORM}" && exit 1 ;; \
20
  esac && \
21
+ echo "Building for ${ARCH} with WARP ${WARP_VERSION}" &&\
22
  apt-get update && \
23
  apt-get upgrade -y && \
24
+ apt-get install -y curl gnupg lsb-release sudo jq ipcalc && \
25
  curl https://pkg.cloudflareclient.com/pubkey.gpg | gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg && \
26
  echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/cloudflare-client.list && \
27
  apt-get update && \
28
  apt-get install -y cloudflare-warp && \
29
  apt-get clean && \
30
  apt-get autoremove -y && \
 
 
 
 
 
 
 
 
 
31
  chmod +x /entrypoint.sh && \
32
  chmod +x /healthcheck/index.sh && \
33
  useradd -m -s /bin/bash warp && \
 
39
  RUN mkdir -p /home/warp/.local/share/warp && \
40
  echo -n 'yes' > /home/warp/.local/share/warp/accepted-tos.txt
41
 
 
42
  ENV WARP_SLEEP=2
43
 
44
  HEALTHCHECK --interval=15s --timeout=5s --start-period=10s --retries=3 \