Tag: centos7

Docker CentOS 7 – cron不能在本地机器上工作

在我的VPS中,我创build了一个包含cron作为入口命令的docker镜像。 我也有一个示例cron文件,说它应该每5分钟执行一次命令。 Dockerfile: FROM centos:centos7 MAINTAINER Lysender <foo@example.com> # Install packages RUN yum -y update && yum clean all RUN yum -y install epel-release && yum clean all RUN yum -y install git \ bind-utils \ pwgen \ psmisc \ net-tools \ hostname \ curl \ curl-devel \ sqlite \ cronie \ libevent \ gearmand […]

在Docker容器中启动Jenkins

我想在Centos7的Docker容器中运行Jenkins。 我看到了Jenkins的官方文档:首先,从Docker存储库中提取官方jenkins镜像。 docker pull jenkins 接下来,使用该映像和映射数据目录从容器运行一个容器到主机; 例如在下面的例子中,容器中的/ var / jenkins_home被映射到主机上当前path的jenkins /目录。 jenkins8080港口也暴露在主机作为49001。 docker run -d -p 49001:8080 -v $PWD/jenkins:/var/jenkins_home -t jenkins 但是,当我尝试运行docker容器时出现以下错误: /usr/local/bin/jenkins.sh: line 25: /var/jenkins_home/copy_reference_file.log: Permission denied 有人能告诉我如何解决这个问题?

Docker服务启动失败

我有一个安装了docker的CentOS 7.2虚拟机,docker服务和docker容器以前正常工作。 但在我试图拉一个docker图像时,虚拟机突然关机。 在我重新启动虚拟机后,docker服务无法启动。 [root@AY13091717064020986bZ ~]# service docker start Redirecting to /bin/systemctl start docker.service Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. systemctl status docker.service输出: [root@AY13091717064020986bZ ~]# systemctl status docker.service ● docker.service – Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor […]

Docker ps和其他子命令都永远挂在CentOS 7.2上

在一个CentOS7.2盒子上,使用Docker 1.10.3,我已经成功地设置了一个简单的docker镜像,使用systemd在启动时运行。 容器运行良好,并做它应该做的(只是运行Apache来服务映射卷中的一些内容)。 奇怪的是,如果我login到正在运行的文件docker anysubcommandbutversion ,sudo为root,然后运行“ docker anysubcommandbutversion ”(“ ps ”,“ info ”等等),它就坐在那里并永远挂起,直到I ^ C它。 我从https://github.com/docker/docker/issues/12606看到,这可能是一个常见问题,但我还没有看到一个明确的解决scheme。

无法访问http:// ip:8443上的OpenShift控制台

我在CentOS7上安装了OpenShift Version 3。 我遵循官方文档: https : //docs.openshift.org/latest/admin_guide/install/prerequisites.html#configuring-docker-storage 方法1(Docker): https : //docs.openshift.org/latest/getting_started/administrators.html#installation-methods 我select在Docker容器中安装OpenShift。 我必须做的最后一个命令是这样的:我使用来自Docker Hub的图像在Docker容器中启动服务器: $ docker run -d –name "openshift-origin" –net=host –privileged \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /tmp/openshift:/tmp/openshift \ openshift/origin start 这个命令: 启动OpenShift监听所有接口(0.0.0.0:8443), 启动监听所有接口(0.0.0.0:8443)的Web控制台, 启动一个etcd服务器来存储持久数据,并且 启动Kubernetes系统组件。 $ sudo docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d3f023085328 openshift/origin "/usr/bin/openshift 2 days ago Up […]

在Vagrant上运行的CentOS 7上无法安装Docker

使用Vagrant文​​件的全新实例 VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "chef/centos-7.0" config.vm.network "forwarded_port", guest: 3000, host: 3007 end 然后运行以下命令 vagrant up vagrant ssh sudo su yum install -y docker systemctl status docker.service 这一切运行良好。 那么错误: [root@localhost vagrant]# sudo systemctl start docker Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details. [root@localhost vagrant]# systemctl […]

在centos7上安装docker:docker-engine-selinux与docker-selinux-冲突

我尝试从yum安装Centos7 ,从Centos7上的安装脚本安装Centos7 ,两者都给出了同样的错误: Error: docker-engine-selinux conflicts with docker-selinux-1.10.3-44.el7.centos.x86_64 我无法弄清楚如何解决这个问题,并得到docker安装。 完整的错误追溯: [root@mynode]# wget -qO- https://get.docker.com/ | sh /usr/bin/docker: line 13: /usr/bin/docker-latest: No such file or directory sh: line 149: [: -lt: unary operator expected sh: line 153: [: -le: unary operator expected Warning: the "docker" command appears to already exist on this system. If you already […]

/var/run/docker.sock无法在容器上运行centos 7

我正在启动一个容器,该容器运行一个bash脚本,在Centos 7.0.1406上使用docker 1.3.2在内部执行docker构build。 文件/命令在https://gist.github.com/wrabbit-revisited/1d70d0f1805be1848c08 。 docker构build需要访问docker套接字,所以我使用一个共同的技巧,根据http://nathanleclaire.com/blog/2014/07/12/10-docker-tips-and-tricks-that-will-make-你唱一首鲸鱼喜悦的歌 : -v /var/run/docker.sock:/var/run/docker.sock 在构build之前,我在脚本中运行一个检查: if [ -e "/var/run/docker.sock" ]; then echo "docker.sock found" else echo "docker.sock not found" fi 和“回声”显示docker.sock未find。 如果检查是使用sudo在容器外部完成的,则会被发现。 我尝试在“docker run”命令行中添加“–permissive = true”,但没有明显的改变。 这里有一些类似的问题引用: https : //github.com/dpw/selinux-dockersock 。 它的目标是Fedora / RHEL,但是也不能解决这个问题。 如果我使用“setenforce Permissive”和sestatus来确保selinux处于宽容模式,问题仍然没有得到解决。 我也尝试添加“–security-opt = label:type:docker_t”到docker命令行,按照https://github.com/jwilder/nginx-proxy/issues/40 。 没有明显的影响。 Docker的selinux策略在这里描述: http : //www.unix.com/man-page/centos/8/docker_selinux/ 。 很多的信息,但我不知道,如果selinux是造成这个问题。 如果我编辑/ etc / […]

如何用docker 1.13版本更改centos 7中的docker安装目录

我已经附上了docker的详细信息, $ docker信息 Containers: 3 Running: 3 Paused: 0 Stopped: 0 Images: 26 Server Version: 1.13.0 Storage Driver: overlay Backing Filesystem: xfs Supports d_type: false Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host macvlan null overlay Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e runc version: […]

我应该创build一个虚拟机,然后使用VM内的Docker机器进行开发

为了解决使用不同操作系统(Windows,OS X和Linux)的不同开发人员的问题,创build定制的VirtualBox映像并在定制的VM中安装Docker Machine(我知道创build另一个VM)是否有意义? 我知道Docker Machine的目的是促进本地和生产环境的发展。 更重要的是,它创build一个虚拟机。 因此,在另一个虚拟机中安装Docker Machine似乎没有多大意义。 但是,为了保证所有开发者实际上都经历了完全相同的本地环境。 有一个定制的虚拟机(与stream浪者)来自动完成包括Docker Machine在内的所有安装过程似乎是有意义的。 那么,请让我知道什么是最佳做法? 让一台CentOS机器stream浪,并自动化安装Docker Machine。 使用Docker机器来创buildDocker容器。 让开发者安装他们自己的Docker机器。 使用Docker机器来创buildDocker容器。 使用CentOS机器来安装Docker Engine,而不是安装Docker Machine。 使用Docker引擎来创buildDocker容器。