Skip to content

Instantly share code, notes, and snippets.

View kbuley's full-sized avatar
🖖

Kevin Buley kbuley

🖖
  • 15:44 (UTC -05:00)
View GitHub Profile
@kbuley
kbuley / CentOS-Docker
Last active October 1, 2019 16:50 — forked from silveraid/CentOS-Docker
Creating minimal CentOS docker image from scratch
# Create a folder for our new root structure
$ export centos_root='/centos_image/rootfs'
$ mkdir -p $centos_root
# initialize rpm database
$ rpm --root $centos_root --initdb
# download and install the centos-release package, it contains our repository sources
$ yum reinstall --downloadonly --downloaddir . centos-release
$ rpm --nodeps --root $centos_root -ivh centos-release*.rpm
$ rpm --root $centos_root --import $centos_root/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
# install yum without docs and install only the english language files during the process