본문 바로가기

리눅스

[Docker] centos 8 systemctl 실행(/sbin/init)

728x90

centos 8 systemctl 실행(/sbin/init)

도커 컨테이너 실행

docker run -it -d --cap-add=SYS_ADMIN --privileged --name centos8 centos:8 /sbin/init

실행 중인 도커 컨테이너 안으로 진입

docker exec -it centos8 bash

컨테이너 안에서 'systemclt' 명령 실행

[root@fba40e763dfb /]$ systemctl
  UNIT                                   LOAD   ACTIVE     SUB       DESCRIPTION
  dev-vda1.device                        loaded activating tentative /dev/vda1
  -.mount                                loaded active     mounted   Root Mount
  dev-mqueue.mount                       loaded active     mounted   POSIX Message Queue File System
  etc-hostname.mount                     loaded active     mounted   /etc/hostname
  etc-hosts.mount                        loaded active     mounted   /etc/hosts
  etc-resolv.conf.mount                  loaded active     mounted   /etc/resolv.conf
  sys-kernel-config.mount                loaded active     mounted   Kernel Configuration File System
  sys-kernel-debug.mount                 loaded active     mounted   Kernel Debug File System
  systemd-ask-password-console.path      loaded active     waiting   Dispatch Password Requests to Console Directory Watch
  systemd-ask-password-wall.path         loaded active     waiting   Forward Password Requests to Wall Directory Watch
  init.scope                             loaded active     running   System and Service Manager
  dbus.service                           loaded active     running   D-Bus System Message Bus
728x90