Last active
January 27, 2021 17:37
Revisions
-
bruth revised this gist
Apr 26, 2016 . 2 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes. -
bruth revised this gist
Apr 26, 2016 . 2 changed files with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ # an error will occur with running `docker-compose`. Rather than changing how /tmp # is mounted, this script creates a wrapper that sets an alternate `TMPDIR` variable. COMPOSE_VERSION=1.7.0 TMP_DIR=/data/tmp mkdir -p $TMP_DIR This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ # See https://docs.docker.com/engine/articles/configuring/#centos-red-hat-enterprise-linux-fedora # Configuration. ENGINE_VERSION=1.11.0 DATA_DIR=/data/docker mkdir -p $DATA_DIR -
bruth revised this gist
Mar 17, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,6 +9,8 @@ COMPOSE_VERSION=1.6.0 TMP_DIR=/data/tmp mkdir -p $TMP_DIR chgrp docker $TMP_DIR chmod g+w $TMP_DIR # Download release. curl -L "https://github.com/docker/compose/releases/download/$COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" > /usr/local/bin/docker-compose-real -
bruth revised this gist
Feb 17, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,5 +20,6 @@ cat << EOF > /usr/local/bin/docker-compose TMPDIR="$TMP_DIR" /usr/local/bin/docker-compose-real \$@ EOF chown root:docker /usr/local/bin/{docker-compose,docker-compose-real} chmod +x /usr/local/bin/docker-compose-real chmod +x /usr/local/bin/docker-compose -
bruth revised this gist
Feb 9, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,2 +1,2 @@ #!/bin/bash /usr/sbin/usermod -aG docker <user> -
bruth revised this gist
Feb 9, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ #!/bin/bash /usr/sbin/usermod -aG docker `whoami` -
bruth revised this gist
Feb 9, 2016 . 2 changed files with 26 additions and 21 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ #!/bin/bash # Install Docker Compose # This script sets installs Compose with an alternate TMPDIR. Compose requires exec # privileges in the /tmp directory, however if /tmp is mounted with `noexec` then # an error will occur with running `docker-compose`. Rather than changing how /tmp # is mounted, this script creates a wrapper that sets an alternate `TMPDIR` variable. COMPOSE_VERSION=1.6.0 TMP_DIR=/data/tmp mkdir -p $TMP_DIR # Download release. curl -L "https://github.com/docker/compose/releases/download/$COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" > /usr/local/bin/docker-compose-real # Create wrapper. cat << EOF > /usr/local/bin/docker-compose #!/bin/bash TMPDIR="$TMP_DIR" /usr/local/bin/docker-compose-real \$@ EOF chmod +x /usr/local/bin/docker-compose-real chmod +x /usr/local/bin/docker-compose This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,18 +1,12 @@ #!/bin/bash # Docker repo on RHEL 7 # This script sets up the official Docker YUM repo on a RHEL 7 machine. # See https://docs.docker.com/engine/articles/configuring/#centos-red-hat-enterprise-linux-fedora # Configuration. ENGINE_VERSION=1.10.0 DATA_DIR=/data/docker mkdir -p $DATA_DIR # Remove existing Docker @@ -71,17 +65,4 @@ systemctl enable docker systemctl start docker # Check status systemctl status -l docker -
bruth renamed this gist
Feb 9, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
bruth revised this gist
Feb 9, 2016 . 1 changed file with 21 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,8 +5,15 @@ # See https://docs.docker.com/engine/articles/configuring/#centos-red-hat-enterprise-linux-fedora # Target versions ENGINE_VERSION=1.10.0 COMPOSE_VERSION=1.6.0 # Data and tmp directories. DATA_DIR=/data/docker TMP_DIR=/data/tmp mkdir -p $TMP_DIR mkdir -p $DATA_DIR # Remove existing Docker yum remove -yt docker docker-selinux @@ -22,7 +29,7 @@ gpgkey=https://yum.dockerproject.org/gpg EOF # Install docker-engine yum install -y "docker-engine-$ENGINE_VERSION" # Add environment file. Update to match the particular host. Note the renamed # argument from --add-registry to --registry-mirror. See https://access.redhat.com/articles/881893 @@ -31,7 +38,7 @@ cat << EOF > /etc/sysconfig/docker DOCKER_CERT_PATH=/etc/docker OPTIONS="--selinux-enabled --graph=$DATA_DIR --host=unix:///var/run/docker.sock --group=docker --registry-mirror=https://registry.access.redhat.com" EOF # Ensure the system directory is created. @@ -67,5 +74,14 @@ systemctl start docker systemctl status docker # Docker Compose curl -L "https://github.com/docker/compose/releases/download/$COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" > /usr/local/bin/docker-compose-real # Wrapper for noexec /tmp file system. cat << EOF > /usr/local/bin/docker-compose #!/bin/bash TMPDIR="$TMP_DIR" /usr/local/bin/docker-compose-real \$@ EOF chmod +x /usr/local/bin/docker-compose-real chmod +x /usr/local/bin/docker-compose -
bruth revised this gist
Feb 9, 2016 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,8 +5,8 @@ # See https://docs.docker.com/engine/articles/configuring/#centos-red-hat-enterprise-linux-fedora # Target versions DOCKER_ENGINE_VERSION=1.10.0 DOCKER_COMPOSE_VERSION=1.6.0 # Remove existing Docker yum remove -yt docker docker-selinux @@ -31,7 +31,7 @@ cat << EOF > /etc/sysconfig/docker DOCKER_CERT_PATH=/etc/docker OPTIONS="--selinux-enabled --graph=/data/docker --host=unix:///var/run/docker.sock --group=docker --registry-mirror=https://registry.access.redhat.com" EOF # Ensure the system directory is created. -
bruth created this gist
Feb 9, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,71 @@ #!/bin/bash # Docker repo on RHEL 7 # This script sets up the official Docker YUM repo on a RHEL 7 machine. # Run as root. # See https://docs.docker.com/engine/articles/configuring/#centos-red-hat-enterprise-linux-fedora # Target versions DOCKER_ENGINE_VERSION=1.10 DOCKER_COMPOSE_VERSION=1.6 # Remove existing Docker yum remove -yt docker docker-selinux # Install official Docker yum repo. See http://docs.docker.com/engine/installation/rhel/ cat << EOF > /etc/yum.repos.d/docker.repo [Docker] name=Docker Repository baseurl=https://yum.dockerproject.org/repo/main/centos/7 enabled=1 gpgcheck=1 gpgkey=https://yum.dockerproject.org/gpg EOF # Install docker-engine yum install -y "docker-engine-$DOCKER_ENGINE_VERSION" # Add environment file. Update to match the particular host. Note the renamed # argument from --add-registry to --registry-mirror. See https://access.redhat.com/articles/881893 cat << EOF > /etc/sysconfig/docker # /etc/sysconfig/docker DOCKER_CERT_PATH=/etc/docker OPTIONS="--selinux-enabled --graph=/data/docker --host=unix:///var/run/docker.sock --group=dockerroot --registry-mirror=https://registry.access.redhat.com" EOF # Ensure the system directory is created. mkdir -p /etc/systemd/system # Override config since ExecStart cannot be extended (per the systemd docs). cat << EOF > /etc/systemd/system/docker.service [Unit] Description=Docker Application Container Engine Documentation=https://docs.docker.com After=network.target docker.socket Requires=docker.socket [Service] Type=notify EnvironmentFile=/etc/sysconfig/docker ExecStart=/usr/bin/docker daemon \$OPTIONS MountFlags=slave LimitNOFILE=1048576 LimitNPROC=1048576 LimitCORE=infinity [Install] WantedBy=multi-user.target EOF # Reload config and start the daemon systemctl daemon-reload systemctl enable docker systemctl start docker # Check status systemctl status docker # Docker Compose curl -L "https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" > /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose