Skip to content

Commit

Permalink
Adjust a ton of image references (especially to use %%IMAGE%%)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianon committed Oct 9, 2017
1 parent 52ff1b4 commit 25a5b70
Show file tree
Hide file tree
Showing 112 changed files with 544 additions and 525 deletions.
14 changes: 7 additions & 7 deletions adminer/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ Adminer (formerly phpMinAdmin) is a full-featured database management tool writt
### Standalone

```console
$ docker run --link some_database:db -p 8080:8080 adminer
$ docker run --link some_database:db -p 8080:8080 %%IMAGE%%
```

Then you can hit `http://localhost:8080` or `http://host-ip:8080` in your browser.

### FastCGI

If you are already running a FastCGI capable web server you might prefer running adminer via FastCGI:
If you are already running a FastCGI capable web server you might prefer running Adminer via FastCGI:

```console
$ docker run --link some_database:db -p 9000:9000 adminer:fastcgi
$ docker run --link some_database:db -p 9000:9000 %%IMAGE%%:fastcgi
```

Then point your web server to port 9000 of the container.
Expand All @@ -36,18 +36,18 @@ Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml

### Loading plugins

This image bundles all official adminer plugins. You can find the list of plugins on GitHub: https://github.com/vrana/adminer/tree/master/plugins.
This image bundles all official Adminer plugins. You can find the list of plugins on GitHub: https://github.com/vrana/adminer/tree/master/plugins.

To load plugins you can pass a list of filenames in `ADMINER_PLUGINS`:

```console
$ docker run --link some_database:db -p 8080:8080 -e ADMINER_PLUGINS='tables-filter tinymce' adminer
$ docker run --link some_database:db -p 8080:8080 -e ADMINER_PLUGINS='tables-filter tinymce' %%IMAGE%%
```

If a plugin *requires* parameters to work correctly you will need to add a custom file to the container:

```console
$ docker run --link some_database:db -p 8080:8080 -e ADMINER_PLUGINS='login-servers' adminer
$ docker run --link some_database:db -p 8080:8080 -e ADMINER_PLUGINS='login-servers' %%IMAGE%%
Unable to load plugin file "login-servers", because it has required parameters: servers
Create a file "/var/www/html/plugins-enabled/login-servers.php" with the following contents to load the plugin:

Expand All @@ -73,7 +73,7 @@ The image bundles all the designs that are available in the source package of ad
To use a bundled design you can pass its name in `ADMINER_DESIGN`:

```console
$ docker run --link some_database:db -p 8080:8080 -e ADMINER_DESIGN='nette' adminer
$ docker run --link some_database:db -p 8080:8080 -e ADMINER_DESIGN='nette' %%IMAGE%%
```

To use a custom design you can add a file called `/var/www/html/adminer.css`.
Expand Down
8 changes: 4 additions & 4 deletions aerospike/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Documentation for Aerospike is available at [http://aerospike.com/docs](https://
The following will run `asd` with all the exposed ports forwarded to the host machine.

```console
$ docker run -d --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 aerospike/aerospike-server
$ docker run -d --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 %%IMAGE%%
```

**NOTE** Although this is the simplest method to getting Aerospike up and running, but it is not the preferred method. To properly run the container, please specify a **custom configuration** with the **access-address** defined.
Expand All @@ -22,7 +22,7 @@ By default, `asd` will use the configuration file at `/etc/aerospike/aerospike.c

-v <DIRECTORY>:/opt/aerospike/etc

Where `<DIRECTORY>` is the path to a directory containing your custom aerospike.conf file. Next, you will want to tell `asd` to use the configuration file that was just mounted by using the `--config-file` option for `aerospike/aerospike-server`:
Where `<DIRECTORY>` is the path to a directory containing your custom aerospike.conf file. Next, you will want to tell `asd` to use the configuration file that was just mounted by using the `--config-file` option for `%%IMAGE%%`:

--config-file /opt/aerospike/etc/aerospike.conf

Expand All @@ -31,7 +31,7 @@ This will tell `asd` to use the config file at `/opt/aerospike/etc/aerospike.con
A full example:

```console
$ docker run -d -v <DIRECTORY>:/opt/aerospike/etc --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 aerospike/aerospike-server asd --foreground --config-file /opt/aerospike/etc/aerospike.conf
$ docker run -d -v <DIRECTORY>:/opt/aerospike/etc --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 %%IMAGE%% asd --foreground --config-file /opt/aerospike/etc/aerospike.conf
```

### access-address Configuration
Expand Down Expand Up @@ -59,7 +59,7 @@ Where `<DIRECTORY>` is the path to a directory containing your data files.
A full example:

```console
$ docker run -d -v <DIRECTORY>:/opt/aerospike/data --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 aerospike/aerospike-server
$ docker run -d -v <DIRECTORY>:/opt/aerospike/data --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 %%IMAGE%%
```

## Clustering
Expand Down
2 changes: 1 addition & 1 deletion alpine/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Use like you would any other base image:

```dockerfile
FROM alpine:3.5
FROM %%IMAGE%%:3.5
RUN apk add --no-cache mysql-client
ENTRYPOINT ["mysql"]
```
Expand Down
16 changes: 8 additions & 8 deletions arangodb/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ Furthermore, ArangoDB offers a microservice framework called [Foxx](https://www.
In order to start an ArangoDB instance run

```console
unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 -d --name arangodb-instance arangodb
unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 -d --name arangodb-instance %%IMAGE%%
```

Will create and launch the arangodb docker instance as background process. The Identifier of the process is printed. By default ArangoDB listen on port 8529 for request and the image includes `EXPOSE 8529`. If you link an application container it is automatically available in the linked container. See the following examples.
Will create and launch the %%IMAGE%% docker instance as background process. The Identifier of the process is printed. By default ArangoDB listen on port 8529 for request and the image includes `EXPOSE 8529`. If you link an application container it is automatically available in the linked container. See the following examples.

In order to get the IP arango listens on run:

Expand All @@ -48,7 +48,7 @@ unix> docker inspect --format '{{ .NetworkSettings.IPAddress }}' arangodb-instan
In order to use the running instance from an application, link the container

```console
unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 --name my-app --link arangodb-instance:db-link arangodb
unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 --name my-app --link arangodb-instance:db-link %%IMAGE%%
```

This will use the instance with the name `arangodb-instance` and link it into the application container. The application container will contain environment variables
Expand All @@ -66,7 +66,7 @@ These can be used to access the database.
If you want to expose the port to the outside world, run

```console
unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 -p 8529:8529 -d arangodb
unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 -p 8529:8529 -d %%IMAGE%%
```

ArangoDB listen on port 8529 for request and the image includes `EXPOSE
Expand Down Expand Up @@ -95,7 +95,7 @@ The ArangoDB image provides several authentication methods which can be specifie
In order to get a list of supported options, run

```console
unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 arangodb arangod --help
unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 %%IMAGE%% arangod --help
```

## Persistent Data
Expand All @@ -116,7 +116,7 @@ You can map the container's volumes to a directory on the host, so that the data
unix> mkdir /tmp/arangodb
unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 -p 8529:8529 -d \
-v /tmp/arangodb:/var/lib/arangodb3 \
arangodb
%%IMAGE%%
```

This will use the `/tmp/arangodb` directory of the host as database directory for ArangoDB inside the container.
Expand All @@ -126,13 +126,13 @@ This will use the `/tmp/arangodb` directory of the host as database directory fo
Alternatively you can create a container holding the data.

```console
unix> docker create --name arangodb-persist arangodb true
unix> docker create --name arangodb-persist %%IMAGE%% true
```

And use this data container in your ArangoDB container.

```console
unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 --volumes-from arangodb-persist -p 8529:8529 arangodb
unix> docker run -e ARANGO_RANDOM_ROOT_PASSWORD=1 --volumes-from arangodb-persist -p 8529:8529 %%IMAGE%%
```

If want to save a few bytes you can alternatively use [busybox](https://registry.hub.docker.com/_/busybox) or [alpine](https://registry.hub.docker.com/_/alpine) for creating the volume only containers. Please note that you need to provide the used volumes in this case. For example
Expand Down
4 changes: 2 additions & 2 deletions backdrop/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Backdrop CMS enables people to build highly customized websites, affordably, thr
The basic pattern for starting a `%%REPO%%` instance is:

```console
$ docker run --name some-%%REPO%% --link some-mysql:mysql -d %%REPO%%
$ docker run --name some-%%REPO%% --link some-mysql:mysql -d %%IMAGE%%
```

The following environment variables are also honored for configuring your Backdrop CMS instance:
Expand All @@ -28,7 +28,7 @@ The `BACKDROP_DB_NAME` **must already exist** on the given MySQL server. Check o
If you'd like to be able to access the instance from the host without the container's IP, standard port mappings can be used:

```console
$ docker run --name some-%%REPO%% --link some-mysql:mysql -p 8080:80 -d %%REPO%%
$ docker run --name some-%%REPO%% --link some-mysql:mysql -p 8080:80 -d %%IMAGE%%
```

Then, access it via `http://localhost:8080` or `http://host-ip:8080` in a browser.
Expand Down
18 changes: 9 additions & 9 deletions bonita/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Bonita BPM is an open-source business process management and workflow suite crea
## Quick start

```console
$ docker run --name bonita -d -p 8080:8080 bonita
$ docker run --name bonita -d -p 8080:8080 %%IMAGE%%
```

This will start a container running the [Tomcat Bundle](http://documentation.bonitasoft.com/?page=tomcat-bundle) with Bonita BPM Engine + Bonita BPM Portal. With no environment variables specified, it's as like if you have launched the bundle on your host using startup.{sh|bat} (with security hardening on REST and HTTP APIs, cf Security part). Bonita BPM uses a H2 database here.
Expand Down Expand Up @@ -40,7 +40,7 @@ $ docker run --name mydbpostgres -v "$PWD"/custom_postgres/:/docker-entrypoint-i
See the [official PostgreSQL documentation](https://registry.hub.docker.com/_/postgres/) for more details.

```console
$ docker run --name bonita_postgres --link mydbpostgres:postgres -d -p 8080:8080 bonita
$ docker run --name bonita_postgres --link mydbpostgres:postgres -d -p 8080:8080 %%IMAGE%%
```

### MySQL
Expand All @@ -64,13 +64,13 @@ See the [official MySQL documentation](https://registry.hub.docker.com/_/mysql/)
Start your application container to link it to the MySQL container:

```console
$ docker run --name bonita_mysql --link mydbmysql:mysql -d -p 8080:8080 bonita
$ docker run --name bonita_mysql --link mydbmysql:mysql -d -p 8080:8080 %%IMAGE%%
```

## Modify default credentials

```console
$ docker run --name=bonita -e "TENANT_LOGIN=tech_user" -e "TENANT_PASSWORD=secret" -e "PLATFORM_LOGIN=pfadmin" -e "PLATFORM_PASSWORD=pfsecret" -d -p 8080:8080 bonita
$ docker run --name=bonita -e "TENANT_LOGIN=tech_user" -e "TENANT_PASSWORD=secret" -e "PLATFORM_LOGIN=pfadmin" -e "PLATFORM_PASSWORD=pfsecret" -d -p 8080:8080 %%IMAGE%%
```

Now you can access the Bonita BPM Portal on localhost:8080/bonita and login using: tech_user / secret
Expand All @@ -89,7 +89,7 @@ The Docker documentation is a good starting point for understanding the differen
1. Create a data directory on a suitable volume on your host system, e.g. `/my/own/datadir`.
2. Start your `%%REPO%%` container like this:

docker run --name some-%%REPO%% -v /my/own/datadir:/opt/bonita -d %%REPO%%:tag
docker run --name some-%%REPO%% -v /my/own/datadir:/opt/bonita -d %%IMAGE%%:tag

The `-v /my/own/datadir:/opt/bonita` part of the command mounts the `/my/own/datadir` directory from the underlying host system as `/opt/bonita` inside the container, where Bonita will deploy the bundle and write data files by default.

Expand Down Expand Up @@ -208,13 +208,13 @@ $ chcon -Rt svirt_sandbox_file_t /my/own/datadir
- If < 7.3.0

```console
$ docker run --name=bonita_7.2.4_postgres --link mydbpostgres:postgres -e "DB_NAME=newbonitadb" -e "DB_USER=newbonitauser" -e "DB_PASS=newbonitapass" -v "$PWD"/bonita_migration:/opt/bonita/ -d -p 8081:8080 bonita:7.2.4
$ docker run --name=bonita_7.2.4_postgres --link mydbpostgres:postgres -e "DB_NAME=newbonitadb" -e "DB_USER=newbonitauser" -e "DB_PASS=newbonitapass" -v "$PWD"/bonita_migration:/opt/bonita/ -d -p 8081:8080 %%IMAGE%%:7.2.4
```

- If >= 7.3.0

```console
$ docker run --name=bonita_7.5.4_postgres --link mydbpostgres:postgres -e "DB_NAME=newbonitadb" -e "DB_USER=newbonitauser" -e "DB_PASS=newbonitapass" -d -p 8081:8080 bonita:7.5.4
$ docker run --name=bonita_7.5.4_postgres --link mydbpostgres:postgres -e "DB_NAME=newbonitadb" -e "DB_USER=newbonitauser" -e "DB_PASS=newbonitapass" -d -p 8081:8080 %%IMAGE%%:7.5.4
```

- Reapply specific configuration if needed, for example with a version >= 7.3.0 :
Expand Down Expand Up @@ -264,7 +264,7 @@ This Docker image activates both static and dynamic authorization checks by defa
For specific needs you can override this behavior by setting HTTP_API to true and REST_API_DYN_AUTH_CHECKS to false:

```console
$ docker run -e HTTP_API=true -e REST_API_DYN_AUTH_CHECKS=false --name bonita -d -p 8080:8080 bonita
$ docker run -e HTTP_API=true -e REST_API_DYN_AUTH_CHECKS=false --name bonita -d -p 8080:8080 %%IMAGE%%
```

## Environment variables
Expand Down Expand Up @@ -358,7 +358,7 @@ For example, you can increase the log level :
echo 'sed -i "s/^org.bonitasoft.level = WARNING$/org.bonitasoft.level = FINEST/" /opt/bonita/BonitaBPMCommunity-7.5.4-Tomcat-7.0.76/server/conf/logging.properties' >> custom_bonita/bonita.sh
chmod +x custom_bonita/bonita.sh

docker run --name bonita_custom -v "$PWD"/custom_bonita/:/opt/custom-init.d -d -p 8080:8080 bonita
docker run --name bonita_custom -v "$PWD"/custom_bonita/:/opt/custom-init.d -d -p 8080:8080 %%IMAGE%%

Note: There are several ways to check the `bonita` logs. One of them is

Expand Down
16 changes: 8 additions & 8 deletions cassandra/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Apache Cassandra is an open source distributed database management system design
Starting a Cassandra instance is simple:

```console
$ docker run --name some-%%REPO%% -d %%REPO%%:tag
$ docker run --name some-%%REPO%% -d %%IMAGE%%:tag
```

... where `some-%%REPO%%` is the name you want to assign to your container and `tag` is the tag specifying the Cassandra version you want. See the list above for relevant tags.
Expand All @@ -31,43 +31,43 @@ $ docker run --name some-app --link some-%%REPO%%:%%REPO%% -d app-that-uses-cass
Using the environment variables documented below, there are two cluster scenarios: instances on the same machine and instances on separate machines. For the same machine, start the instance as described above. To start other instances, just tell each new node where the first is.

```console
$ docker run --name some-%%REPO%%2 -d -e CASSANDRA_SEEDS="$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' some-%%REPO%%)" %%REPO%%:tag
$ docker run --name some-%%REPO%%2 -d -e CASSANDRA_SEEDS="$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' some-%%REPO%%)" %%IMAGE%%:tag
```

... where `some-%%REPO%%` is the name of your original Cassandra Server container, taking advantage of `docker inspect` to get the IP address of the other container.

Or you may use the docker run --link option to tell the new node where the first is:

```console
$ docker run --name some-cassandra2 -d --link some-cassandra:cassandra cassandra:tag
$ docker run --name some-cassandra2 -d --link some-cassandra:cassandra %%IMAGE%%:tag
```

For separate machines (ie, two VMs on a cloud provider), you need to tell Cassandra what IP address to advertise to the other nodes (since the address of the container is behind the docker bridge).

Assuming the first machine's IP address is `10.42.42.42` and the second's is `10.43.43.43`, start the first with exposed gossip port:

```console
$ docker run --name some-%%REPO%% -d -e CASSANDRA_BROADCAST_ADDRESS=10.42.42.42 -p 7000:7000 %%REPO%%:tag
$ docker run --name some-%%REPO%% -d -e CASSANDRA_BROADCAST_ADDRESS=10.42.42.42 -p 7000:7000 %%IMAGE%%:tag
```

Then start a Cassandra container on the second machine, with the exposed gossip port and seed pointing to the first machine:

```console
$ docker run --name some-%%REPO%% -d -e CASSANDRA_BROADCAST_ADDRESS=10.43.43.43 -p 7000:7000 -e CASSANDRA_SEEDS=10.42.42.42 %%REPO%%:tag
$ docker run --name some-%%REPO%% -d -e CASSANDRA_BROADCAST_ADDRESS=10.43.43.43 -p 7000:7000 -e CASSANDRA_SEEDS=10.42.42.42 %%IMAGE%%:tag
```

## Connect to Cassandra from `cqlsh`

The following command starts another Cassandra container instance and runs `cqlsh` (Cassandra Query Language Shell) against your original Cassandra container, allowing you to execute CQL statements against your database instance:

```console
$ docker run -it --link some-%%REPO%%:cassandra --rm %%REPO%% sh -c 'exec cqlsh "$CASSANDRA_PORT_9042_TCP_ADDR"'
$ docker run -it --link some-%%REPO%%:cassandra --rm %%IMAGE%% sh -c 'exec cqlsh "$CASSANDRA_PORT_9042_TCP_ADDR"'
```

... or (simplified to take advantage of the `/etc/hosts` entry Docker adds for linked containers):

```console
$ docker run -it --link some-%%REPO%%:cassandra --rm %%REPO%% cqlsh cassandra
$ docker run -it --link some-%%REPO%%:cassandra --rm %%IMAGE%% cqlsh cassandra
```

... where `some-%%REPO%%` is the name of your original Cassandra Server container.
Expand Down Expand Up @@ -147,7 +147,7 @@ The Docker documentation is a good starting point for understanding the differen
2. Start your `%%REPO%%` container like this:

```console
$ docker run --name some-%%REPO%% -v /my/own/datadir:/var/lib/cassandra -d %%REPO%%:tag
$ docker run --name some-%%REPO%% -v /my/own/datadir:/var/lib/cassandra -d %%IMAGE%%:tag
```

The `-v /my/own/datadir:/var/lib/cassandra` part of the command mounts the `/my/own/datadir` directory from the underlying host system as `/var/lib/cassandra` inside the container, where Cassandra by default will write its data files.
Expand Down
Loading

0 comments on commit 25a5b70

Please sign in to comment.