리눅스 서버 TIP

Docker Container 에서 systemctl 않 먹을때

작성자 정보

  • Becain 작성
  • 작성일

컨텐츠 정보

본문

[root@6f1262682213 /]# systemctl

Failed to get D-Bus connection: Operation not permitted

 

이렇게 systemctl 이 않 먹을때에는 아래처럼 --priviledged 옵션을 넣어서 container 를 생성해주면 됩니다.  ^^

 

conyii@DESKTOP-GKR5T7R:/mnt/c/Users/conyi$ docker run -it --privileged -d -v test-vol --name nas_server centos:7 /sbin/init

f44364bc28b591c70825593899a639ef3d5ec07ca2daec59b87481900656c398

conyii@DESKTOP-GKR5T7R:/mnt/c/Users/conyi$

conyii@DESKTOP-GKR5T7R:/mnt/c/Users/conyi$

conyii@DESKTOP-GKR5T7R:/mnt/c/Users/conyi$ docker exec -it nas_server /bin/bash

[root@f44364bc28b5 /]# systemctl

UNIT                                   LOAD   ACTIVE     SUB       DESCRIPTION

proc-sys-fs-binfmt_misc.automount      loaded active     waiting   Arbitrary Executable File Formats File System Automount Point

dev-sdd.device                         loaded activating tentative /dev/sdd

-.mount                                loaded active     mounted   /

dev-hugepages.mount                    loaded active     mounted   Huge Pages File System

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-fs-fuse-connections.mount          loaded active     mounted   FUSE Control File System

sys-kernel-debug.mount                 loaded active     mounted   Debug File System

test\x2dvol.mount                      loaded active     mounted   /test-vol

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

dbus.service                           loaded active     running   D-Bus System Message Bus

getty@tty1.service                     loaded active     running   Getty on tty1

systemd-hwdb-update.service            loaded active     exited    Rebuild Hardware Database

systemd-journal-catalog-update.service loaded active     exited    Rebuild Journal Catalog

systemd-journal-flush.service          loaded active     exited    Flush Journal to Persistent Storage

systemd-journald.service               loaded active     running   Journal Service

systemd-logind.service                 loaded active     running   Login Service

systemd-random-seed.service            loaded active     exited    Load/Save Random Seed

systemd-sysctl.service                 loaded active     exited    Apply Kernel Variables

systemd-tmpfiles-setup-dev.service     loaded active     exited    Create Static Device Nodes in /dev

systemd-tmpfiles-setup.service         loaded active     exited    Create Volatile Files and Directories

systemd-udev-trigger.service           loaded active     exited    udev Coldplug all Devices

systemd-udevd.service                  loaded active     running   udev Kernel Device Manager

systemd-update-done.service            loaded active     exited    Update is Completed

systemd-update-utmp.service            loaded active     exited    Update UTMP about System Boot/Shutdown

관련자료

댓글 0
등록된 댓글이 없습니다.

공지글


  • 글이 없습니다.

동영상


최근글


새댓글


포인트 랭킹


COUNT


오늘
131
어제
128
최대
487
전체
62,246