LoremPizza commited on
Commit
4871b23
·
verified ·
1 Parent(s): f992eeb

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +34 -0
Dockerfile ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:22.04
2
+
3
+ # Install dependencies
4
+ RUN apt-get update && \
5
+ apt-get install -y curl gnupg lsb-release sudo jq ipcalc python3 python3-pip
6
+
7
+ # Add Cloudflare WARP key and repository
8
+ RUN curl https://pkg.cloudflareclient.com/pubkey.gpg | gpg --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg && \
9
+ 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
10
+
11
+ # Install Cloudflare WARP
12
+ RUN apt-get update && \
13
+ apt-get install -y cloudflare-warp && \
14
+ apt-get clean && \
15
+ apt-get autoremove -y
16
+
17
+ # Create a user warp with user ID 1000 to avoid permission issues
18
+ RUN useradd -m -u 1000 -s /bin/bash warp
19
+
20
+ # Set the working directory to the warp user's home
21
+ WORKDIR /home/warp
22
+
23
+ # Copy the entrypoint script to the container
24
+ COPY entrypoint.sh /entrypoint.sh
25
+ RUN chmod +x /entrypoint.sh
26
+
27
+ # Use the warp user
28
+ USER warp
29
+
30
+ # Environment variables for WARP
31
+ ENV WARP_SLEEP=2
32
+
33
+ # Run the entrypoint script
34
+ ENTRYPOINT ["/entrypoint.sh"]