(. Io sono un principiante Docker Poi ho seguito alcuni tutorial per CentOS-7)Docker (CentOS 7 con systemctl): Impossibile montare tmpfs & cgroup
Nel mio CentOS 7.2
, ho cercato di imparare Docker seguendo i passaggi seguenti.
# docker version
Client:
Version: 1.10.3
API version: 1.22
Go version: go1.5.3
Git commit: 20f81dd
Built: Thu Mar 10 15:39:25 2016
OS/Arch: linux/amd64
Server:
Version: 1.10.3
API version: 1.22
Go version: go1.5.3
Git commit: 20f81dd
Built: Thu Mar 10 15:39:25 2016
OS/Arch: linux/amd64
# docker pull centos:latest
# docker images
centos latest 778a53015523 12 days ago 196.7 MB
# mkdir ~/docker/centos7-systemd
# cd ~/docker/centos7-systemd
# vi Dockerfile
FROM centos
MAINTAINER "XXXX XXXX" <[email protected]>
ENV container docker
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
VOLUME [ "/sys/fs/cgroup" ]
CMD ["/usr/sbin/init"]
# docker build --rm -t local/centos7-systemd .
..
Successfully built 1a9f1c4938b3
# docker images
centos latest 778a53015523 12 days ago 196.7 MB
local/centos7-systemd latest 1a9f1c4938b3 8 seconds ago 196.7 MB
Quindi, fino a questo punto, tutto (sembra) ok.
Ora il problema viene quando corro:
# docker run -ti -v /sys/fs/cgroup:/sys/fs/cgroup:ro -p 80:80 local/centos7-systemd
Failed to mount tmpfs at /run: Operation not permitted
Failed to mount cgroup at /sys/fs/cgroup/systemd: Operation not permitted
[!!!!!!] Failed to mount API filesystems, freezing.
Cosa significa anche, e soprattutto, cosa sta succedendo e come posso risolvere questo problema, si prega di?
grazie a tutti voi :)
Funziona davvero! Grazie mille!! (E hai qualche idea quando corro, perché non funziona in background, ma è sul mio terminale.) Scusa, non so come spiegarlo. Grazie ancora: D –
Oh l'ho già scoperto. Devo usare l'opzione '-d'! Grazie! –
prego. – arcticless