diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cf76199 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM ubuntu:22.04 + +RUN echo 'root:root' | chpasswd +RUN printf '#!/bin/sh\nexit 0' > /usr/sbin/policy-rc.d +RUN apt-get update +RUN apt-get install -y systemd systemd-sysv dbus dbus-user-session +RUN printf "systemctl start systemd-logind" >> /etc/profile + +RUN apt-get install wget net-tools + +ENTRYPOINT ["/sbin/init"] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 7be6d51..f0fe8e2 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -2,7 +2,7 @@ services: u22: # command: command container_name: u22 - image: ubuntu:22.04 + image: ubuntu-systemd:22.04 restart: always # ports: # - 3111-3222:3111-3222 @@ -10,9 +10,11 @@ services: # - local privileged: true network_mode: host + build: + context: . volumes: - ${ROOT_DIR}:/root - /etc/localtime:/etc/localtime:ro environment: APP_ADDRESS: 0.0.0.0:3111 - command: ['tail', '-f', '/dev/null'] + # command: ['tail', '-f', '/dev/null']