Permalink
Browse files

allow installing without input

  • Loading branch information...
1 parent c07d87b commit db800805b9e5056822f3ca5b32ec178d7d0d42dc @stefanfoulis stefanfoulis committed Mar 4, 2014
Showing with 10 additions and 3 deletions.
  1. +1 −1 README.rst
  2. +9 −2 install.sh
View
@@ -13,7 +13,7 @@ This solution is simpler for clients and does not require a docker image that co
quick-installer (run on the host machine as root)::
- bash <(curl -fsSL https://raw.github.com/aldryn/aldryncloud-docker-api-exposer/master/install.sh)
+ sudo bash <(curl -fsSL https://raw.github.com/aldryn/aldryncloud-docker-api-exposer/master/install.sh)
starting the container::
View
@@ -3,13 +3,20 @@
# this is the I-totally-trust-you-quick-installer-script.
# pulls the docker-api-exposer from index.docker.io and
# runs it.
+#
# to install:
# bash <(curl -fsSL https://raw.github.com/aldryn/aldryncloud-docker-api-exposer/master/install.sh)
+#
+# install and pass in the password directly without prompting:
+# PASSWORD=my-awesome-pasword bash <(curl -fsSL https://raw.github.com/aldryn/aldryncloud-docker-api-exposer/master/install.sh)
+#
###############################################################################
echo 'Installing docker-api-exposer'
-echo 'Please enter a basic auth password to be used to access the api over http:'
-read -s PASSWORD
+if [[ -z "$PASSWORD" ]]; then
+ echo 'Please enter a basic auth password to be used to access the api over http:'
+ read -s PASSWORD
+fi
# echo 'removing previous docker containers named "docker-api-exposer"'
# docker stop docker-api-exposer | xargs docker rm
docker run -d -p 0.0.0.0:4243:4243 -v /var/run/docker.sock:/tmp/docker.sock:rw --env PASSWORD="$PASSWORD" -name docker-api-exposer aldryn/docker-api-exposer:v6

0 comments on commit db80080

Please sign in to comment.