-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Bug 69111 - Add an offline installation option for docker supply
- Loading branch information
1 parent
f11be7f
commit 8dbf3dd
Showing
3 changed files
with
170 additions
and
33 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
[ "$(id -u)" -ne 0 ] && { echo "To perform this action you must be logged in with root rights"; exit 1; } | ||
|
||
TEMP_DIR=$(mktemp -d) | ||
|
||
trap 'echo "Cleaning up temporary files..."; rm -rf "${TEMP_DIR}"' EXIT | ||
|
||
! type docker &> /dev/null && { echo "docker not installed"; exit 1; } | ||
! type docker-compose &> /dev/null && { echo "docker-compose not installed"; exit 1; } | ||
|
||
echo "Extracting docker images to ${TEMP_DIR}..." | ||
tail -n +$(awk '/^__END_OF_SHELL_SCRIPT__$/{print NR + 1; exit 0;}' "$0") "$0" | tar x -C "${TEMP_DIR}" | ||
|
||
echo "Loading docker images..." | ||
docker load -i ${TEMP_DIR}/docker_images.tar.xz | ||
|
||
echo "Extracting OneClickInstall files to the current directory..." | ||
mv -f ${TEMP_DIR}/docker.tar.gz $(dirname "$0")/docker.tar.gz | ||
mv -f ${TEMP_DIR}/install-Docker.sh $(dirname "$0")/install-Docker.sh | ||
|
||
echo "Running the install-Docker.sh script..." | ||
chmod +x $(dirname "$0")/install-Docker.sh | ||
$(dirname "$0")/install-Docker.sh | ||
|
||
exit 0 | ||
|
||
__END_OF_SHELL_SCRIPT__ |