Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +6 -5
Dockerfile
CHANGED
|
@@ -41,9 +41,9 @@ RUN apt-get update && \
|
|
| 41 |
# echo 'ubuntu:password' | chpasswd && \
|
| 42 |
|
| 43 |
RUN useradd -m admin && \
|
| 44 |
-
echo "admin:password" | chpasswd
|
| 45 |
-
usermod -aG sudo admin && \
|
| 46 |
-
echo "admin ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
| 47 |
|
| 48 |
#RUN id -u ubuntu &>/dev/null || useradd -m -s /bin/bash ubuntu && \
|
| 49 |
# usermod -aG sudo ubuntu && \
|
|
@@ -56,8 +56,9 @@ echo "admin:password" | chpasswd && \
|
|
| 56 |
COPY . /app
|
| 57 |
|
| 58 |
# Create necessary directories and set permissions
|
| 59 |
-
RUN mkdir -p /var/run/sshd /app /app/users/sshs /app/ssh && \
|
| 60 |
-
chmod -R 777 /app
|
|
|
|
| 61 |
# touch /etc/sudoers
|
| 62 |
|
| 63 |
# Grant full sudo access to the 'administrator' group
|
|
|
|
| 41 |
# echo 'ubuntu:password' | chpasswd && \
|
| 42 |
|
| 43 |
RUN useradd -m admin && \
|
| 44 |
+
echo "admin:password" | chpasswd
|
| 45 |
+
# usermod -aG sudo admin && \
|
| 46 |
+
# echo "admin ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
| 47 |
|
| 48 |
#RUN id -u ubuntu &>/dev/null || useradd -m -s /bin/bash ubuntu && \
|
| 49 |
# usermod -aG sudo ubuntu && \
|
|
|
|
| 56 |
COPY . /app
|
| 57 |
|
| 58 |
# Create necessary directories and set permissions
|
| 59 |
+
RUN mkdir -p /var/run/sshd /app /app/users/sshs /app/ssh /home/admin/.ssh && \
|
| 60 |
+
chmod -R 777 /app && \
|
| 61 |
+
cp /app/ssh_config /home/admin/.ssh/config
|
| 62 |
# touch /etc/sudoers
|
| 63 |
|
| 64 |
# Grant full sudo access to the 'administrator' group
|