privateone commited on
Commit
30f8168
·
verified ·
1 Parent(s): b3a4f77

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -0
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM coturn/coturn:alpine
2
+
3
+ USER root
4
+
5
+ # Install socat and openssl for certificate generation
6
+ RUN apk add --no-cache socat openssl
7
+
8
+ # Create cert directory
9
+ RUN mkdir -p /etc/turn/certs
10
+
11
+ # Generate self-signed cert and private key (valid 365 days)
12
+ RUN openssl req -x509 -nodes -newkey rsa:2048 \
13
+ -keyout /etc/turn/certs/turn_server_pkey.pem \
14
+ -out /etc/turn/certs/turn_server_cert.pem \
15
+ -days 365 \
16
+ -subj "/C=US/ST=State/L=City/O=Org/OU=Unit/CN=privateone-cotun.hf.space"
17
+
18
+ # Set cert directory permissions
19
+ RUN chmod 600 /etc/turn/certs/*
20
+
21
+ # Copy your custom entrypoint script
22
+ RUN mkdir -p /custom-entrypoint
23
+ COPY custom-entrypoint.sh /custom-entrypoint/entrypoint.sh
24
+ RUN chmod +x /custom-entrypoint/entrypoint.sh
25
+
26
+ # Expose port 7860 TCP and UDP
27
+ EXPOSE 7860 7860/udp
28
+
29
+ # Set custom entrypoint
30
+ ENTRYPOINT ["/custom-entrypoint/entrypoint.sh"]