Nexchan commited on
Commit
2ea0e50
1 Parent(s): 4467544

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -3
Dockerfile CHANGED
@@ -15,9 +15,14 @@ RUN apt update && apt upgrade -y
15
  # Install required packages
16
  RUN apt install -y curl openssh-server
17
 
 
 
 
 
 
 
18
  # Configure SSH server
19
  RUN mkdir /var/run/sshd
20
- RUN echo 'Nex:password' | chpasswd
21
  RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
22
  RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
23
 
@@ -42,9 +47,10 @@ RUN apt --yes install libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libgbm1 li
42
  # Install ImageMagick
43
  RUN apt install -y imagemagick
44
 
45
- # Create a non-root user named Nex and switch to it
46
- RUN useradd -m -u 1000 Nex
47
  RUN mkdir /home/Nex/.ssh && chown Nex:Nex /home/Nex/.ssh
 
 
48
  USER Nex
49
 
50
  # Set environment variables for the user
 
15
  # Install required packages
16
  RUN apt install -y curl openssh-server
17
 
18
+ # Create a non-root user named Nex
19
+ RUN useradd -m -u 1000 Nex
20
+
21
+ # Set the password for the Nex user
22
+ RUN echo 'Nex:password' | chpasswd
23
+
24
  # Configure SSH server
25
  RUN mkdir /var/run/sshd
 
26
  RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
27
  RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
28
 
 
47
  # Install ImageMagick
48
  RUN apt install -y imagemagick
49
 
50
+ # Create .ssh directory for Nex user
 
51
  RUN mkdir /home/Nex/.ssh && chown Nex:Nex /home/Nex/.ssh
52
+
53
+ # Switch to Nex user
54
  USER Nex
55
 
56
  # Set environment variables for the user