Fred808 commited on
Commit
d800701
·
verified ·
1 Parent(s): 4dd3b5f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -19
Dockerfile CHANGED
@@ -3,35 +3,23 @@ FROM ubuntu:22.04
3
  RUN apt-get update && apt-get install -y \
4
  openssh-server \
5
  dante-server \
6
- iptables \
7
- iproute2 \
8
- net-tools \
9
  curl \
10
- sudo \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # Configure SSH and create user
14
- RUN mkdir -p /var/run/sshd && \
15
- useradd -m -s /bin/bash tunneluser
16
-
17
- # Set IP forwarding on boot (for NAT)
18
- RUN echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
19
-
20
- # Copy configs early
21
  COPY ssh-config/sshd_config /etc/ssh/sshd_config
22
  COPY socks5-config/danted.conf /etc/danted.conf
 
23
 
24
- # Set permissions
25
- RUN chmod 600 /etc/ssh/sshd_config && \
26
- chmod 644 /etc/danted.conf
27
 
28
- USER root
29
-
30
- # Set up working directory and copy rest
31
  WORKDIR /app
32
  COPY . /app
33
- RUN chmod -R 755 /app && chmod +x /app/entrypoint.sh
34
 
35
  EXPOSE 22 1080
 
36
 
37
  ENTRYPOINT ["/app/entrypoint.sh"]
 
3
  RUN apt-get update && apt-get install -y \
4
  openssh-server \
5
  dante-server \
 
 
 
6
  curl \
 
7
  && rm -rf /var/lib/apt/lists/*
8
 
9
+ # Add SSH/Dante config
 
 
 
 
 
 
 
10
  COPY ssh-config/sshd_config /etc/ssh/sshd_config
11
  COPY socks5-config/danted.conf /etc/danted.conf
12
+ RUN chmod 600 /etc/ssh/sshd_config && chmod 644 /etc/danted.conf
13
 
14
+ # Ensure SSH can run
15
+ RUN mkdir -p /var/run/sshd && ssh-keygen -A
 
16
 
17
+ # Setup
 
 
18
  WORKDIR /app
19
  COPY . /app
20
+ RUN chmod +x /app/entrypoint.sh
21
 
22
  EXPOSE 22 1080
23
+ USER root
24
 
25
  ENTRYPOINT ["/app/entrypoint.sh"]