Skip to content

Instantly share code, notes, and snippets.

@astrsk-hori
Created October 5, 2015 04:12
Show Gist options
  • Save astrsk-hori/bbaf0e8b0246bed941ce to your computer and use it in GitHub Desktop.
Save astrsk-hori/bbaf0e8b0246bed941ce to your computer and use it in GitHub Desktop.
dockerfileにproxyを適用
#!/bin/sh
## http://qiita.com/speg03/items/4b8573686e7bbf218b61
## 上記から取得
if [ $# != 1 ]; then
echo "Usage: $0 DOCKER_IMAGE"
exit 1
fi
cat <<EOF | docker build -t $1 -
FROM $1
ONBUILD ENV http_proxy $http_proxy
ONBUILD ENV https_proxy $https_proxy
ONBUILD ENV no_proxy $no_proxy
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment