Sign inSign up

wiexon/centos

By wiexon

•Updated over 5 years ago

Image
0

126

wiexon/centos repository overview

This is the Dockerfile to create the image from scratch

FROM centos
MAINTAINER "sis" <[email protected]>
ENV container docker
RUN yum -y update; yum clean all
RUN yum -y install systemd; yum clean all; \
(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 command:

docker image build -t wiexon/centos:dbus .

To run centos: example docker run command

docker run --name centosbe -itd \
--network mynet --privileged \
-e container=docker  \
-v /sys/fs/cgroup:/sys/fs/cgroup \
-p 8080:8080 -p 53:53/udp \
wiexon/centos:dbus /usr/sbin/init

Tag summary

Content type

Image

Digest

Size

104 MB

Last updated

over 5 years ago

docker pull wiexon/centos:dbus