Solve Error โ€˜System has not been booted with systemd as init system (PID 1)โ€™ in a Docker Container

๐š) ๐—ฆ๐—ผ๐—น๐˜‚๐˜๐—ถ๐—ผ๐—ป ๐—ณ๐—ผ๐—ฟ ๐—จ๐—ฏ๐˜‚๐—ป๐˜๐˜‚

๐๐ฎ๐ฅ๐ฅ ๐ˆ๐ฆ๐š๐ ๐ž ๐œ๐จ๐ฆ๐ฆ๐š๐ง๐ :

docker run -d --name Linuxamination --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro jrei/systemd-ubuntu:20.04

 

๐‹๐จ๐  ๐ข๐ง๐ญ๐จ ๐ญ๐ก๐ž ๐‚๐จ๐ง๐ญ๐š๐ข๐ง๐ž๐ซ :

docker exec -it Linuxamination bash

 

๐›) ๐—ฆ๐—ผ๐—น๐˜‚๐˜๐—ถ๐—ผ๐—ป ๐—ณ๐—ผ๐—ฟ ๐—–๐—ฒ๐—ป๐˜๐—ข๐—ฆ

๐๐ฎ๐ฅ๐ฅ ๐ˆ๐ฆ๐š๐ ๐ž ๐œ๐จ๐ฆ๐ฆ๐š๐ง๐ :

docker run -d --name linuxaminationC8 --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro alekseychudov/centos8-systemd

 

๐‹๐จ๐  ๐ข๐ง๐ญ๐จ ๐ญ๐ก๐ž ๐‚๐จ๐ง๐ญ๐š๐ข๐ง๐ž๐ซ :

docker exec -it linuxaminationC8 bash

 

๐œ) ๐—ฆ๐—ผ๐—น๐˜‚๐˜๐—ถ๐—ผ๐—ป ๐—ณ๐—ผ๐—ฟ ๐ƒ๐ž๐›๐ข๐š๐ง

๐๐ฎ๐ฅ๐ฅ ๐ˆ๐ฆ๐š๐ ๐ž ๐œ๐จ๐ฆ๐ฆ๐š๐ง๐ :

sudo docker run -d --name systemd-debian --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro jrei/systemd-debian:11

 

๐‹๐จ๐  ๐ข๐ง๐ญ๐จ ๐ญ๐ก๐ž ๐‚๐จ๐ง๐ญ๐š๐ข๐ง๐ž๐ซ :

sudo docker exec -it systemd-debian bash

 

๐) ๐—ฆ๐—ผ๐—น๐˜‚๐˜๐—ถ๐—ผ๐—ป ๐—ณ๐—ผ๐—ฟ ๐—ณ๐—ฒ๐—ฑ๐—ผ๐—ฟ๐—ฎ

๐๐ฎ๐ฅ๐ฅ ๐ˆ๐ฆ๐š๐ ๐ž ๐œ๐จ๐ฆ๐ฆ๐š๐ง๐ :

sudo docker run -d --name systemd-fedora --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro jrei/systemd-fedora

 

๐‹๐จ๐  ๐ข๐ง๐ญ๐จ ๐ญ๐ก๐ž ๐‚๐จ๐ง๐ญ๐š๐ข๐ง๐ž๐ซ :

sudo docker exec -it systemd-fedora bash

 

๐—ฒ) ๐—ฆ๐—ผ๐—น๐˜‚๐˜๐—ถ๐—ผ๐—ป ๐—ณ๐—ผ๐—ฟ ๐—ฅ๐—ฒ๐—ฑ๐—ต๐—ฎ๐˜ ๐—Ÿ๐—ถ๐—ป๐˜‚๐˜…

๐๐ฎ๐ฅ๐ฅ ๐ˆ๐ฆ๐š๐ ๐ž ๐œ๐จ๐ฆ๐ฆ๐š๐ง๐ :

sudo docker run -d --name linuxamination --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro registry.access.redhat.com/ubi8/ubi-init:8.1

 

๐‹๐จ๐  ๐ข๐ง๐ญ๐จ ๐ญ๐ก๐ž ๐‚๐จ๐ง๐ญ๐š๐ข๐ง๐ž๐ซ :

sudo docker exec -it linuxamination bash

 

๐Ÿ) ๐—ฆ๐—ผ๐—น๐˜‚๐˜๐—ถ๐—ผ๐—ป ๐—ณ๐—ผ๐—ฟ ๐€๐ฅ๐ฆ๐š๐‹๐ข๐ง๐ฎ๐ฑ

๐๐ฎ๐ฅ๐ฅ ๐ˆ๐ฆ๐š๐ ๐ž ๐œ๐จ๐ฆ๐ฆ๐š๐ง๐ :

sudo docker run -d --name almalinuxamination --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro almalinux/8-init

 

๐‹๐จ๐  ๐ข๐ง๐ญ๐จ ๐ญ๐ก๐ž ๐‚๐จ๐ง๐ญ๐š๐ข๐ง๐ž๐ซ :

sudo docker exec -it almalinuxamination bash

 

 

Bookmarked Post

Related Posts