These scripts will help you install Docker, Docker Compose, and Docker Machine.
Make sure you have jq
available first.
These scripts will help you install Docker, Docker Compose, and Docker Machine.
Make sure you have jq
available first.
# Find the version you want to install on their GitHub releases page: | |
# https://github.com/docker/compose/releases | |
VERSION=`curl https://api.github.com/repos/docker/compose/releases | jq -r "[.[] | select(.prerelease == false and .draft == false) | .tag_name][0]"` | |
curl -L https://github.com/docker/compose/releases/download/$VERSION/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose |
# Find the version you want to install on their GitHub releases page: | |
# https://github.com/docker/machine/releases | |
VERSION=`curl https://api.github.com/repos/docker/machine/releases | jq -r "[.[] | select(.prerelease == false and .draft == false) | .tag_name][0]"` | |
curl -L https://github.com/docker/machine/releases/download/$VERSION/docker-machine-`uname -s`-`uname -m` > /usr/local/bin/docker-machine | |
chmod +x /usr/local/bin/docker-machine |
set -e | |
VER_TO_INSTALL=$1 | |
CURRENT_VER=`docker -v` | |
echo "Current version: $CURRENT_VER" | |
curl -L https://get.docker.com/builds/Darwin/x86_64/docker-$VER_TO_INSTALL.tgz | tar xv --strip=1 -C /usr/local/bin/ - | |
chmod +x /usr/local/bin/docker | |
NEW_VER=`docker -v` | |
echo "New version: $NEW_VER" |