File tree 3 files changed +34
-0
lines changed 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ 20
Original file line number Diff line number Diff line change
1
+ version : " 3.9"
2
+
3
+ services :
4
+ server :
5
+ build :
6
+ dockerfile : docker/server.Dockerfile
7
+ command : " "
8
+ privileged : true
9
+ cgroup : host
10
+ ports :
11
+ - 127.0.0.1:2222:22
12
+ volumes :
13
+ - /sys/fs/cgroup:/sys/fs/cgroup:rw
Original file line number Diff line number Diff line change
1
+ FROM geerlingguy/docker-debian12-ansible
2
+
3
+ RUN apt update && \
4
+ apt install -y ca-certificates curl gnupg openssh-server && \
5
+ install -m 0755 -d /etc/apt/keyrings && \
6
+ curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
7
+ chmod a+r /etc/apt/keyrings/docker.gpg && \
8
+ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
9
+ $(. /etc/os-release && echo " $VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \
10
+ apt update && \
11
+ apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
12
+
13
+ RUN echo "PermitEmptyPasswords yes \n \
14
+ PermitRootLogin yes \n \
15
+ PasswordAuthentication yes" > /etc/ssh/sshd_config
16
+
17
+ RUN adduser david && \
18
+ usermod -aG docker david && \
19
+ echo "david ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/david && \
20
+ passwd -d david
You can’t perform that action at this time.
0 commit comments