Merge pull request #105 from wovalle/main

Adding Docker Compose
This commit is contained in:
tteckster 2022-03-28 06:04:00 -04:00 committed by GitHub
commit a818b08182
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,6 +65,7 @@ get_latest_release() {
DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby")
PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer")
DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose")
echo -en "${GN} Installing Docker $DOCKER_LATEST_VERSION... "
DOCKER_CONFIG_PATH='/etc/docker/daemon.json'
@ -99,6 +100,24 @@ docker run -d \
echo -e "${CM}${CL} \r"
fi
read -r -p "Would you like to add Docker Compose? <Y/n> " prompt
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
then
DOCKER_COMPOSE="Y"
else
DOCKER_COMPOSE="N"
fi
if [[ $DOCKER_COMPOSE == "Y" ]]; then
echo -en "${GN} Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION... "
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
mkdir -p $DOCKER_CONFIG/cli-plugins
curl -sSL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_LATEST_VERSION/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
docker compose version
echo -e "${CM}${CL} \r"
fi
PASS=$(grep -w "root" /etc/shadow | cut -b6);
if [[ $PASS != $ ]]; then
echo -en "${GN} Customizing Container... "