기본 콘텐츠로 건너뛰기

3월, 2023의 게시물 표시

systemctl daemon-reload 안될때 [System has not been booted with systemd as init system (PID 1). Can't operate]

일반 Linux 에서 진행 $ sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig $ sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target $ exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME $ snap version  https://gist.github.com/alyleite/ca8b10581dbecd722d9dcc35b50d9b2b Docker Container 에서 진행 두가지 파라미터 필요 --privileged=true  /sbin/init $ sudo docker run -it -d --privileged=true --name {container_name} {image} /sbin/init https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities https://velog.io/@steveloper/Ubuntu-docker-container-%EC%97%90%EC%84%9C-systemctl-%EC%82%AC%EC%9A%A9%EC%8B%9C-%EB%B0%9C%EC%83%9D%ED%95%98%EB%8A%94-%EB%AC%B8%EC%A0%9CSystem-has-not-been-booted-with-systemd-as-init-system-PID-1.-Cant-operate.Failed-to-connect-to-bus-Host-is-down