Spaces:
Running
Running
thejagstudio
commited on
Commit
•
7056218
1
Parent(s):
9057cc3
Update Dockerfile
Browse files- Dockerfile +10 -1
Dockerfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
FROM debian:sid
|
2 |
RUN chown root:shadow /etc/shadow; chmod 640 /etc/shadow;
|
3 |
RUN [ -r /sbin/unix_chkpwd ] && chmod 2755 /sbin/unix_chkpwd || echo "/sbin/unix_chkpwd skipped"
|
4 |
RUN useradd -d /home/user -s /bin/bash -m -u 1000 user
|
@@ -45,6 +45,15 @@ ADD pushcookie/ /home/user/Desktop/myshell/
|
|
45 |
RUN chmod 777 /home/user/Desktop/myshell/*.sh
|
46 |
RUN tar -xzf /home/user/Desktop/myshell/chromeset.tar.gz -C /tmp/
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
# 切换到 user 用户
|
49 |
USER user
|
50 |
# 复制 /tmp/.config/chromium 目录到 /home/user/.config/ 目录,保留文件属性和链接
|
|
|
1 |
+
FROM debian:sid
|
2 |
RUN chown root:shadow /etc/shadow; chmod 640 /etc/shadow;
|
3 |
RUN [ -r /sbin/unix_chkpwd ] && chmod 2755 /sbin/unix_chkpwd || echo "/sbin/unix_chkpwd skipped"
|
4 |
RUN useradd -d /home/user -s /bin/bash -m -u 1000 user
|
|
|
45 |
RUN chmod 777 /home/user/Desktop/myshell/*.sh
|
46 |
RUN tar -xzf /home/user/Desktop/myshell/chromeset.tar.gz -C /tmp/
|
47 |
|
48 |
+
# Grant sudo permissions to all users without password
|
49 |
+
RUN echo "ALL ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
50 |
+
|
51 |
+
# Make sure the sudo group exists and add the user to it
|
52 |
+
RUN groupadd -f sudo && usermod -aG sudo user
|
53 |
+
|
54 |
+
# Ensure sudo is installed
|
55 |
+
RUN apt-get update && apt-get install -y sudo
|
56 |
+
|
57 |
# 切换到 user 用户
|
58 |
USER user
|
59 |
# 复制 /tmp/.config/chromium 目录到 /home/user/.config/ 目录,保留文件属性和链接
|