Docker version: [root@localhost gae_proxy]# docker version Client: Version: 1.10.3 API version: 1.22 Package version: docker-common-1.10.3-46.el7.centos.10.x86_64 Go version: go1.6.3 Git commit: d381c64-unsupported Built: Thu Aug 4 13:21:17 2016 OS/Arch: linux/amd64 Server: Version: 1.10.3 API version: 1.22 Package version: docker-common-1.10.3-46.el7.centos.10.x86_64 Go version: go1.6.3 Git commit: d381c64-unsupported Built: Thu Aug 4 13:21:17 2016 OS/Arch: linux/amd64 Image version [root@b2ca5610d3da /]# cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) When starting the service through systemctl in docker, an error message such as Failed to get D-Bus connection: Operation not permitted is always reported. [root@25d27693a24d ~]# systemctl start sshd Failed to get D-Bus connection: Operation not permitted The solution is to run /usr/sbin/init when docker run. for example: [root@localhost /]# docker run -tid --name hadoopbase centos/hadoopbase:v001 /usr/sbin/init The container that is running in this way can use systemctl to start the service. Some people say that the problem of error when running through systemctl has been solved in CentOS7.2, but I still encounter such a problem in actual operation. Another solution is to execute the /usr/sbin/init command through CMD when generating the image file through Dockerfile, that is: CMD ["/usr/sbin/init"]; Reference: https://github.com/docker/docker/issues/7459 The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of Mysql's method of optimizing order by statement
>>: How to run JavaScript in Jupyter Notebook
1. Build the basic image of jmeter The Dockerfile...
A sophomore asked me how to install and configure...
Environmental Description: There is a running MyS...
Yum (full name Yellow dog Updater, Modified) is a...
Table of contents definition grammar Examples 1. ...
The requirement is to pass in the rating data for...
What is Vite? (It’s a new toy on the front end) V...
Recently, due to the need to test security produc...
background There is a requirement in the project ...
Recently, the Vue project needs to refresh the da...
calc is a function in CSS that is used to calcula...
Preface Before starting this article, let’s do a ...
Method 1: Modify the .bashrc or .bash_profile fil...
The implementation principle of chain programming...
1. Always close HTML tags In the source code of p...