From 838368d9410029089f2a7b6fd0a9639d959f9dbf Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 24 Feb 2014 15:14:42 -0800 Subject: [PATCH] */README.md: Replace '-name' with '--name' and '-link' with '--link' Docker has adopted GNU-style long options with v0.8.0 :) [1]: First step toward getopt style flags: As we keep compatibility with flags like -dns we can't have -i -t -> -it but at least - and -- are now correct. [1]: https://github.com/dotcloud/docker/pull/3322 e71dbf4 (update commands.go, 2013-12-23) --- docker-registry/README.md | 2 +- elasticsearch/README.md | 6 +++--- kibana-azure/README.md | 2 +- kibana/README.md | 2 +- memcached/README.md | 4 ++-- nginx-proxy/README.md | 6 +++--- nginx/README.md | 2 +- package-cache/README.md | 2 +- portage/README.md | 8 ++++---- postgresql/README.md | 6 +++--- redis/README.md | 4 ++-- stunnel/README.md | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/docker-registry/README.md b/docker-registry/README.md index fb3a154..7341545 100644 --- a/docker-registry/README.md +++ b/docker-registry/README.md @@ -1,7 +1,7 @@ Run this [docker-registry][] image with: $ mkdir /var/lib/docker-registry - $ docker run -d -name docker-registry \ + $ docker run -d --name docker-registry \ > -v /var/lib/docker-registry:/tmp/registry \ > -p 5000:5000 wking/docker-registry diff --git a/elasticsearch/README.md b/elasticsearch/README.md index 99a63f3..0315b0b 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -1,14 +1,14 @@ Run this [Elasticsearch][] image with: - $ docker run -d -name elasticsearch-0 wking/elasticsearch + $ docker run -d --name elasticsearch-0 wking/elasticsearch Then [link][linking] to it from your client container: - $ docker run -link elasticsearch-0:elasticsearch your-client + $ docker run --link elasticsearch-0:elasticsearch your-client For example, we can use the Gentoo client: - $ docker run -link elasticsearch-0:elasticsearch -i -t wking/gentoo /bin/bash + $ docker run --link elasticsearch-0:elasticsearch -i -t wking/gentoo /bin/bash d30608cbc8a1 / # HOST_PORT="${ELASTICSEARCH_PORT#[a-z]*://}" d30608cbc8a1 / # HOST="${HOST_PORT%:[0-9]*}" d30608cbc8a1 / # PORT="${HOST_PORT#[0-9.]*:}" diff --git a/kibana-azure/README.md b/kibana-azure/README.md index 96b70c0..4fd94db 100644 --- a/kibana-azure/README.md +++ b/kibana-azure/README.md @@ -1,6 +1,6 @@ Run this [Kibana][] image with: - $ docker run -d -name kibana-0 -e ELASTICSEARCH_URL=http://es.example.com:9200 -p 80:80 wking/kibana-azure + $ docker run -d --name kibana-0 -e ELASTICSEARCH_URL=http://es.example.com:9200 -p 80:80 wking/kibana-azure It's just like the basic `kibana` image, but it's built from my [azure branch][azure] with a custom default dashboard. diff --git a/kibana/README.md b/kibana/README.md index 57cdf12..6b8c8e8 100644 --- a/kibana/README.md +++ b/kibana/README.md @@ -1,5 +1,5 @@ Run this [Kibana][] image with: - $ docker run -d -name kibana-0 -e ELASTICSEARCH_URL=http://es.example.com:9200 -p 80:80 wking/kibana + $ docker run -d --name kibana-0 -e ELASTICSEARCH_URL=http://es.example.com:9200 -p 80:80 wking/kibana [Kibana]: http://www.elasticsearch.org/overview/kibana/ diff --git a/memcached/README.md b/memcached/README.md index 7b27cec..212f962 100644 --- a/memcached/README.md +++ b/memcached/README.md @@ -1,6 +1,6 @@ Run this [Memcached][] image with: - $ docker run -d -name memcached-0 -m 128m -e MEMUSAGE=118 wking/memcached + $ docker run -d --name memcached-0 -m 128m -e MEMUSAGE=118 wking/memcached The 10MB difference between container memory and the Memcached-specific `MEMUSAGE` limit gives some overhead for the @@ -9,7 +9,7 @@ Memcached-specific `MEMUSAGE` limit gives some overhead for the Then [link][linking] to it from your client container: - $ docker run -link memcached-0:memcached your-client + $ docker run --link memcached-0:memcached your-client Inside your client, use the `MEMCACHED_PORT` environment variable (which should be something like `tcp://172.17.0.8:11211`) to configure diff --git a/nginx-proxy/README.md b/nginx-proxy/README.md index 109300d..41944bd 100644 --- a/nginx-proxy/README.md +++ b/nginx-proxy/README.md @@ -6,9 +6,9 @@ plaintext and [TLS][] connections, and uses [Server Name Indication Run this [Nginx][] image with: - $ docker run -d -name nginx-a -v /var/www/a.net/htdocs:/var/www/localhost/htdocs wking/nginx - $ docker run -d -name nginx-b -v /var/www/b.com/htdocs:/var/www/localhost/htdocs wking/nginx - $ docker run -d -name nginx-proxy-0 -link nginx-a:a -e A_NAME=a.com -link nginx-b:b -e B_NAME=b.net -v /etc/ssl/nginx-proxy-0:/etc/ssl/nginx -p 80:80 -p 443:443 wking/nginx-proxy + $ docker run -d --name nginx-a -v /var/www/a.net/htdocs:/var/www/localhost/htdocs wking/nginx + $ docker run -d --name nginx-b -v /var/www/b.com/htdocs:/var/www/localhost/htdocs wking/nginx + $ docker run -d --name nginx-proxy-0 --link nginx-a:a -e A_NAME=a.com --link nginx-b:b -e B_NAME=b.net -v /etc/ssl/nginx-proxy-0:/etc/ssl/nginx -p 80:80 -p 443:443 wking/nginx-proxy [volume-mounting][volume-mount] your certificates and keys under the container's `/etc/ssl/nginx`. The `*_NAME` environment variables diff --git a/nginx/README.md b/nginx/README.md index 05355cc..6bb768b 100644 --- a/nginx/README.md +++ b/nginx/README.md @@ -1,6 +1,6 @@ Run this [Nginx][] image with: - $ docker run -d -name nginx-0 -v /var/www/nginx-0/htdocs:/var/www/localhost/htdocs -p 80:80 wking/nginx + $ docker run -d --name nginx-0 -v /var/www/nginx-0/htdocs:/var/www/localhost/htdocs -p 80:80 wking/nginx [volume-mounting][volume-mount] your content under the container's `/var/www/localhost/htdocs`. You can also mount volumes from other diff --git a/package-cache/README.md b/package-cache/README.md index fb086a8..3a863ec 100644 --- a/package-cache/README.md +++ b/package-cache/README.md @@ -1,6 +1,6 @@ Run this [package-cache][] image with: - $ docker run -d -name package-cache-0 -v /var/cache/package-cache-0:/usr/portage -p 4000:80 wking/package-cache + $ docker run -d --name package-cache-0 -v /var/cache/package-cache-0:/usr/portage -p 4000:80 wking/package-cache [volume-mounting][volume-mount] your content under the container's `/usr/portage`. Then setup you host firewall to intercept outgoing diff --git a/portage/README.md b/portage/README.md index 43a5bc9..2fbac74 100644 --- a/portage/README.md +++ b/portage/README.md @@ -1,11 +1,11 @@ Use volume mounts to avoid including the Portage tree in your images: - $ docker run -d -name portage wking/portage + $ docker run -d --name portage wking/portage This exports a [VOLUME][] which you can [mount][volumes-from] from another container: - $ docker run -volumes-from portage -i -t wking/gentoo /bin/bash + $ docker run --volumes-from portage -i -t wking/gentoo /bin/bash d1a49abc4b3c / # ls /usr/portage/ app-accessibility dev-python mail-mta sci-mathematics … @@ -26,7 +26,7 @@ the first container: Now kill that container and spin up another one: - $ docker run -volumes-from portage -i -t wking/gentoo /bin/bash + $ docker run --volumes-from portage -i -t wking/gentoo /bin/bash 187adaf8babd / # emerge -pv netcat … These are the packages that would be merged, in order: @@ -47,7 +47,7 @@ promptings for reading the news on both `d1a49abc4b3c` and You can use container volumes even if their container is not running. For example: - $ docker run -name portage wking/portage true + $ docker run --name portage wking/portage true However, it may be useful to leave the container running so you don't remove it up by accident. diff --git a/postgresql/README.md b/postgresql/README.md index fd279f4..39ba232 100644 --- a/postgresql/README.md +++ b/postgresql/README.md @@ -1,15 +1,15 @@ Run this [PostgreSQL][] image with: - $ docker run -d -name postgresql-0 wking/postgresql + $ docker run -d --name postgresql-0 wking/postgresql Then [link][linking] to it from your client container: - $ docker run -link postgresql-0:postgresql your-client + $ docker run --link postgresql-0:postgresql your-client For example, we can use the PostgreSQL client in the `wking/postgresql` image itself: - $ docker run -link postgresql-0:postgresql -i -t wking/postgresql /bin/bash + $ docker run --link postgresql-0:postgresql -i -t wking/postgresql /bin/bash 94ca64e60a00 / # HOST_PORT="${POSTGRESQL_PORT#[a-z]*://}" 94ca64e60a00 / # HOST="${HOST_PORT%:[0-9]*}" 94ca64e60a00 / # PORT="${HOST_PORT#[0-9.]*:}" diff --git a/redis/README.md b/redis/README.md index 1e7e2b2..91832d3 100644 --- a/redis/README.md +++ b/redis/README.md @@ -1,10 +1,10 @@ Run this [Redis][] image with: - $ docker run -d -name redis-0 wking/redis + $ docker run -d --name redis-0 wking/redis Then [link][linking] to it from your client container: - $ docker run -link redis-0:redis your-client + $ docker run --link redis-0:redis your-client Inside your client, use the `REDIS_PORT` environment variable (which should be something like `tcp://172.17.0.8:6379`) to configure your diff --git a/stunnel/README.md b/stunnel/README.md index 7f06030..cbaaa3a 100644 --- a/stunnel/README.md +++ b/stunnel/README.md @@ -3,8 +3,8 @@ encryption using Docker's [linking][]. You'll want to [volume-mount][volume-mount] your SSL keys, since you may want different keys in every stunnel container. - $ docker run -d -name postgresql-0 wking/postgresql - $ docker run -d -name postgresql-0-ssl -v /etc/postgresql-0-ssl/stunnel.pem:/etc/stunnel/stunnel.pem -link postgresql-0:server -p 5432:9999 wking/stunnel + $ docker run -d --name postgresql-0 wking/postgresql + $ docker run -d --name postgresql-0-ssl -v /etc/postgresql-0-ssl/stunnel.pem:/etc/stunnel/stunnel.pem --link postgresql-0:server -p 5432:9999 wking/stunnel [PostgreSQL][] [uses plaintext commands to initiate SSL/TLS encryption][SSLRequest] so you can't use `psql` to connect directly to -- 2.26.2