BinaryONe commited on
Commit
1671103
·
1 Parent(s): e69d427
Files changed (2) hide show
  1. Dockerfile +3 -3
  2. start.sh +1 -1
Dockerfile CHANGED
@@ -82,17 +82,17 @@ RUN python3 -m venv /app/WebSSHEnv && \
82
  #RUN chown -R admin:admin /home/admin
83
 
84
  # Set working directory
85
- WORKDIR /app
86
 
87
  # Expose necessary ports
88
  EXPOSE 7860 2222
89
 
90
  # Switch to 'admin' user and set working directory
91
- USER admin
92
 
93
  #WORKDIR /home/admin
94
  # Change ownership of /home/admin directory
95
  #RUN chown -R admin:admin /home/admin
96
-
97
  # Default command to keep the container running
98
  CMD ["/app/start.sh"]
 
82
  #RUN chown -R admin:admin /home/admin
83
 
84
  # Set working directory
85
+ #WORKDIR /app
86
 
87
  # Expose necessary ports
88
  EXPOSE 7860 2222
89
 
90
  # Switch to 'admin' user and set working directory
91
+ #USER admin
92
 
93
  #WORKDIR /home/admin
94
  # Change ownership of /home/admin directory
95
  #RUN chown -R admin:admin /home/admin
96
+ RUN chmod -R 777 /app/* /home/*
97
  # Default command to keep the container running
98
  CMD ["/app/start.sh"]
start.sh CHANGED
@@ -7,7 +7,7 @@ echo "* The Current User of this container is: $(whoami)"
7
  echo "* ID of the user running the script: $(id -u) * Group: $(id -g) * Status of Admin: $(id admin 2>/dev/null || echo 'Admin user not found')"
8
 
9
  # Switch to admin user and run a command
10
- echo "password" | su admin -c "bash -i"
11
  # Commands to run as admin user
12
  echo "* Now running as: $(whoami)"
13
 
 
7
  echo "* ID of the user running the script: $(id -u) * Group: $(id -g) * Status of Admin: $(id admin 2>/dev/null || echo 'Admin user not found')"
8
 
9
  # Switch to admin user and run a command
10
+ echo "password" | su - admin -c "bash -i"
11
  # Commands to run as admin user
12
  echo "* Now running as: $(whoami)"
13