Skip to content

Commit

Permalink
provision: Only install docker if not already installed
Browse files Browse the repository at this point in the history
Install docker only if not already installed. This allows building on
top of image stages that already install docker before these
provisioning steps.

Signed-off-by: Jarno Rajahalme <[email protected]>
  • Loading branch information
jrajahalme committed Jan 4, 2023
1 parent 3d41741 commit 2975ec4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions provision/ubuntu/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,12 @@ EOF
# wget https://packages.cloud.google.com/apt/doc/apt-key.gpg
# apt-key add apt-key.gpg

#Install packages
sudo apt-get update
sudo apt-get install -y docker-ce
sudo usermod -aG docker ${USERNAME}
# Install docker if not already installed
if ! which docker > /dev/null; then
sudo apt-get update
sudo apt-get install -y docker-ce
sudo usermod -aG docker ${USERNAME}
fi

# Install clang/llvm
# This should always converge to use the same LLVM version as in
Expand Down

0 comments on commit 2975ec4

Please sign in to comment.