Skip to content

Instantly share code, notes, and snippets.

@joepreludian
Last active October 7, 2016 02:27
Show Gist options
  • Save joepreludian/5c3c384c067312e3090ed7743b4e379e to your computer and use it in GitHub Desktop.
Save joepreludian/5c3c384c067312e3090ed7743b4e379e to your computer and use it in GitHub Desktop.
Docker Install - Part 2
#!/bin/bash
wget https://gist.githubusercontent.com/joepreludian/abb17de9779cc12b4eff9a5e48211ac6/raw/5f926c816730f35802b5ccdb8946179e7dc86306/docker.repo -P /etc/yum.repos.d/
dnf groupinstall "Development Tools" -y
dnf install docker-engine -y
echo "* Create a partition /dev/sdc1 with type - linux LVM to continue."
read pause
cfdisk /dev/sdc;
pvcreate /dev/sdc1
vgcreate docker /dev/sdc1
lvcreate --wipesignatures y -n thinpool docker -l 95%VG
lvcreate --wipesignatures y -n thinpoolmeta docker -l 1%VG
lvconvert -y --zero n -c 512K --thinpool docker/thinpool --poolmetadata docker/thinpoolmeta
wget https://gist.githubusercontent.com/joepreludian/deaed114e178dd71374926a1b06ad8d2/raw/68951f2773a647741b8114009cbe2b709e7889d8/docker-thinpool.profile -P /etc/lvm/profile/
lvchange --metadataprofile docker-thinpool docker/thinpool
sed s/dockerd/dockerd\ \--config-file=\\/etc\\/docker\\/daemon.json/g /lib/systemd/system/docker.service > /root/docker.service.tmp; mv /lib/systemd/system/docker.service /root/docker.service.bkp; mv /root/docker.service.tmp /lib/systemd/system/docker.service
wget https://gist.githubusercontent.com/joepreludian/c7e10330c46acb2c1cb4ab70ea0bbc24/raw/8da90d26535047303aa3037805310df2862eb050/daemon.json -P /etc/docker/
systemctl daemon-reload
systemctl enable docker
systemctl start docker
echo "/dev/sdd /mnt/storage ext4 noatime,defaults 1 1" > /etc/fstab
mount /mnt/storage
echo "Might be ready. Enjoy!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment