Last active
March 31, 2020 20:46
-
-
Save stevenfollis/91d2b64b07a3c2110f879727761fbf1f to your computer and use it in GitHub Desktop.
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
# https://docs.docker.com/engine/installation/windows/docker-ee/#install-docker-ee | |
<# Usage | |
Invoke-WebRequest ` | |
-UseBasicParsing ` | |
-OutFile C:\install-docker-ee.ps1 ` | |
-Uri https://gist.githubusercontent.com/stevenfollis/91d2b64b07a3c2110f879727761fbf1f/raw/install-docker-ee.ps1 | |
C:\install-docker-ee.ps1 | |
#> | |
param ( | |
[string]$DOCKER_EE_VERSION="18.09" | |
) | |
# Install NuGet | |
Install-PackageProvider -Name NuGet -Force | |
# Install Provider | |
Install-Module DockerMsftProvider -Force | |
# Install Docker Package | |
Install-Package Docker -ProviderName DockerMsftProvider -RequiredVersion 18.09 -Force | |
# Restart | |
Restart-Computer |
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
#!/bin/bash | |
# | |
# Install Docker Enterprise Edition Engine on Ubuntu | |
# Store license URL | |
readonly DOCKER_EE_URL=$1 | |
# Repository name for Docker EE Engine | |
readonly DOCKER_EE_VERSION=$2 | |
installEngine() { | |
# Update the apt package index | |
sudo apt-get -qq update | |
# Install packages to allow apt to use a repository over HTTPS | |
sudo apt-get -qq install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common | |
# Add Docker’s official GPG key using your customer Docker EE repository URL | |
curl -fsSL "${DOCKER_EE_URL}/ubuntu/gpg" | sudo apt-key add - | |
# Set up the Docker repository | |
sudo add-apt-repository \ | |
"deb [arch=$(dpkg --print-architecture)] ${DOCKER_EE_URL}/ubuntu \ | |
$(lsb_release -cs) \ | |
${DOCKER_EE_VERSION}" | |
# Update the apt package index | |
sudo apt-get -qq update | |
# Install the latest version of Docker EE | |
# dpkg produces lots of chatter | |
# redirect to abyss via https://askubuntu.com/a/258226 | |
sudo apt-get -qq install docker-ee docker-ee-cli containerd.io > /dev/null | |
# Add user to docker group | |
sudo usermod -aG docker "${USER}" | |
# Finished | |
echo "Finished installing Docker EE Engine" | |
} | |
main() { | |
installEngine | |
} | |
main |
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
# Install UCP | |
docker run \ | |
--rm \ | |
--name ucp \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
docker/ucp:latest install \ | |
--admin-username "admin" \ | |
--admin-password "Docker123!" \ | |
--san ucp.ishmael.in dtr.ishmael.in apps.ishmael.in | |
# Store join tokens | |
MANAGER_TOKEN=$(docker swarm join-token manager) | |
WORKER_TOKEN=$(docker swarm join-token worker) | |
TOKENS="{\"tokens\": { \"manager\": \"$MANAGER_TOKEN\", \"worker\": \"$WORKER_TOKEN \" } }" | |
echo "Installed UCP" | |
echo "@@@" | |
echo $TOKENS | |
echo "@@@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment