This "docker" image is based on the "Docker" CentOS base image.
Differences between "feduxorg/centos" and "library/centos"
- Uses "systemd" as PID 1 by default
- Has the network service "disabled" - this really only prevents an error,
but does not disable network functionality
- The fast mirror plugin is diabled to reduce round-trips before download
packages via HTTP proxies
- Enabled priorities for CentOS repositories
- Limited journal size in container since an "outer" journald does not touch
journals from other inner journalds.
- Added scripts to enable "EPEL" or "RPMFORGE"
- Added "gosu" as sudo/su replacement
- Enabled and running "dbus"-service
- Set TERM-environment variable to xterm
- Script Runner for simple initializer shell scripts
- Additional packages
- Addiontional volumes
- Default command is "/usr/sbin/init" aka "systemd"
- Workdir is "/"
To run a image please use this command:
docker run -ti -v /sys/fs/cgroup:/sys/fs/cgroup:ro -v /var/log/journal:/var/log/journal feduxorg/centos
If a directory is mounted to
/usr/local/bin/script-runner.sh. This script runs all executable files
docker run -it --rm --name centos1 -v /sys/fs/cgroup:/sys/fs/cgroup -v $(pwd)/tmp:/var/lib/scripts feduxorg/centos
If you prefer to have a login prompt you need to add the following in your
RUN systemctl unmask console-getty.service \ && systemctl enable console-getty.service