github.com/pvitto98/fabric@v2.1.1+incompatible/vagrant/docker.sh (about) 1 #!/bin/bash -eu 2 # 3 # Copyright IBM Corp. All Rights Reserved. 4 # 5 # SPDX-License-Identifier: Apache-2.0 6 7 COMPOSE_VERSION=1.24.0 8 9 export DEBIAN_FRONTEND=noninteractive 10 11 # ---------------------------------------------------------------- 12 # Configure apt repository 13 # ---------------------------------------------------------------- 14 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - 15 add-apt-repository \ 16 "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ 17 $(lsb_release -cs) \ 18 stable" 19 20 # ---------------------------------------------------------------- 21 # Install docker 22 # ---------------------------------------------------------------- 23 apt-get -qq update 24 apt-get install -y docker-ce 25 26 # ---------------------------------------------------------------- 27 # Allow vagrant user to access docker 28 # ---------------------------------------------------------------- 29 usermod -a -G docker vagrant 30 31 # ---------------------------------------------------------------- 32 # Install docker-compose 33 # ---------------------------------------------------------------- 34 curl -sL "https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" > /usr/local/bin/docker-compose 35 chmod +x /usr/local/bin/docker-compose