Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

Commit

Permalink
chameleonsocks.sh: download docker image from github
Browse files Browse the repository at this point in the history
Previously the chameleonsocks docker image was pulled from Docker Hub.
The Docker engine cannot access the Docker Hub repo if the host is
behind a proxy.

Signed-off-by: Todor Minchev <[email protected]>
  • Loading branch information
todorez committed May 26, 2016
1 parent 504dd2e commit 44bdfbe
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions chameleonsocks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ if [ "$(id -u)" != "0" ]; then
exit 1
fi

IMAGE=crops/chameleonsocks:latest
VERSION=1.1
IMAGE=crops/chameleonsocks:$VERSION
DOCKER_UI=uifd/ui-for-docker
DEFAULT_EXCEPTIONS=https://raw.githubusercontent.com/crops/chameleonsocks/master/confs/chameleonsocks.exceptions
DOCKER_IMAGE=https://github.com/crops/chameleonsocks/releases/download/v$VERSION/chameleonsocks-$VERSION.tar.gz

usage () {
echo -e "\nUsage \n\n$0 [option]\n"
Expand Down Expand Up @@ -85,7 +87,8 @@ uninstall_ui () {

chameleonsocks_install () {
echo -e "\nDownloading chameleonsocks image"
docker pull $IMAGE || \
FILENAME=$(basename "$DOCKER_IMAGE")
wget $DOCKER_IMAGE && gunzip -c ./$FILENAME | docker load && rm -rf ./$FILENAME || \
{ echo "Downloading $IMAGE failed" ; exit 1; }

echo -e "\nCreate chameleonsocks image"
Expand Down

0 comments on commit 44bdfbe

Please sign in to comment.