docker run -itd –privileged –name=apache -v /var/www/html/:/var/www/html/ -p 8888:80 myapache:v1 /usr/sbin/init
The system has not been booted with systemd as init system (PID 1). Can’t operate.
Failed to connect to bus: Host is down
docker run -itd — privileged –name myCentos centos /usr/sbin/init
After creation: use the following command to enter the container
docker exec -it myCentos /bin/bash
Pay special attention to the bold content and don’t forget it
The reason is that/bin/Bash is executed in the first step by default, and systemctl cannot be used because of a bug in docker
Therefore, we use/usr/SBIN/init and — privileged, so that we can use systemctl, but override the default/bin/bash
Therefore, if we want to enter the container, we can no longer use docker attach mycentos
Instead, you can only use docker exec -it myCentos /bin/bash Because exec allows us to execute the overridden default command/bin/bash
At the same time -it is also necessary.
- Docker Build Error: Failed to get D-Bus connection: Operation not permitted [Solved]
- Docker Create tomcat Error standard_init_linux.go:211: exec user process caused “no such file or directory”
- [environment] docker: error response from daemon: OCI runtime
- [Solved] CentOS build a docker error: job for docker.service failed….
- Docker Open Error: Warning: docker.service changed on disk. Run ‘systemctl daemon-reload‘ to reload unit
- Docker service startup error: Job for docker.service failed because the control process exited with error code.
- Docker run Error: container_linux.go:235: starting container process caused “process_linux.go:258: appl
- Error in node when PM2 starts multiple processes in docker
- How to Solve Hexo init error: bash: hexo: command not found
- ArchLinux starts error after modifying MariaDB database path Can’t create test file /xxxxx/xxxxx-test
- [Solved] ERROR: for jms_koko Cannot start service koko: driver failed programming
- [Solved] Error response from daemon: Get “*“: x509: certificate signed by unknown authority
- [Solved] Docker Error: got permission denied while trying to connect to the docker daemon socket at…
- How to Solve k8s Nodal issues: /sys/fs/cgroup/memory/docker: no space left on device\““: unknown.
- How to Solve Kafka Error: no leader
- How to Solve Docker Error: elasticsearch exception: type=cluster_block_exception, reason=blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];
- How to Fix ERROR Couldn’t connect to Docker daemon at http+docker://localunixsocket
- [Solved] Fabric 2.x: error starting container: API error (404): network_test not found
- [Solved] Docker Startup Error: panic: runtime error: invalid memory address or nil pointer dereference
- docker load Error processing tar file(exit status 1): archive/tar: invalid tar header