Last active
July 7, 2020 13:51
-
-
Save mathew-fleisch/5b8219f1e499477ffbd3a7fc297373f4 to your computer and use it in GitHub Desktop.
Dependency Installer
This file contains 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 characters
# Goal: install java11, maven, gradle, kops and terraform in an empty ubuntu docker container | |
############################# From Host ############################# | |
# Remove previous tests if present | |
[ -n "$(docker ps -q --filter name=test-dependency-installer)" ] \ | |
&& docker rm -f $(docker ps -q --filter name=test-dependency-installer); | |
# Spin up empty docker ubuntu container | |
docker run -dit --name test-dependency-installer ubuntu:latest | |
docker exec -it $(docker ps -q --filter name=test-dependency-installer) /bin/bash | |
############################# From Host ############################# | |
############################# In Container ############################# | |
# Bootstrap dependency installer (requires curl) | |
apt-get update && apt-get install -y curl \ | |
&& curl -s https://s3.amazonaws.com/download.draios.com/dependencies/get-dependency-installer.sh | bash | |
cd dependency-installer | |
# Install example-dependencies.yaml | |
cat example-dependencies.yaml | |
./installer.sh example-dependencies.yaml | |
# Note: JAVA_HOME is not set in the installation session. | |
# Exiting and reentering the container will accomplish the same as: | |
source /etc/profile.d/jdk.sh | |
# Verify dependencies were installed | |
java -version | |
mvn -version | |
gradle -version | |
kops version | |
terraform -version | |
############################# In Container ############################# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment