Dockerfile
FROM centos:7
ENV container docker
VOLUME ["/sys/fs/cgroup"]
RUN yum -y update
RUN yum install -y httpd
RUN systemctl start httpd.service
ADD . /code
WORKDIR /code
docker-compose.yml
version: '2'
services:
web:
privileged: true
build: .
ports:
- "80:80"
volumes:
- .:/code
命令
docker-compose build
错误:第6步: 运行systemctl start httpd.service ---> 正在运行5989c6576ac9
?[91m无法获取D-Bus连接:操作不允许
?[0m?[31m错误?[0m:服务'web'构建失败:命令'/bin/sh -c systemctl start httpd.service'返回非零代码:1 注意: 运行在Windows 7 :(
有什么提示吗?