Git cloning the playground can be a great way to get started. (See Getting Started)

But to make it your own, you should customize it to include the programs that you want to use.

Compose file

The file that we are going to change is what is called a Docker compose file. This file contains the details of what programs (or containers) that are included in the playground and how they are configured.

The compose file is located in the root of the playground folder. It is named docker-compose.yml.

You can edit this file in your favorite text editor, if you don't have a favorite one, we recommend Atom.

Restarting with new configuration

If you make any changes to docker-compose.yml, just run the command

docker-compose up -d  

again, and it will compare the running container configuration with the new one, and take the required steps to make sure that everything matches what you changed.

This means that the compose file is a good description of how your playground is configured! If you forget, you can always look here to see how everything is connected.

Common customizations

For a full list of what you can do with the containers, see the Docker Compose File Reference

Change a tool version

The image setting specifies which version of an image to use.

For example, such a setting for InfluxDB might look like:

image: influxdb  

This could be changed to another version like this:

image: influxdb:0.13  

Too see available versions, see the docker hub page of the container. The influx tags are available at https://hub.docker.com/r/library/influxdb/tags

No version tag is equal to using the tag latest.

Change a tool configuration

Docker containers are usually configured in one of two ways. Either by setting an environmental variable of the container, or by mapping a configuration file in to the container.

The InfluxDB container supports both configuration modes. Lets say that we want to turn of the http logging, so that the log isn't filled up with requests.

Then add the following lines to under the influx configuration:

environment:  
    - INFLUXDB_HTTP_LOG_ENABLED=false

And then restart with the new configuration (described above).

For reference, the total compose configuration for InfluxDB might look like this:

influx:  
  image: influxdb
  volumes:
    - ./data/influxdb:/var/lib/influxdb
  environment:
   - INFLUXDB_HTTP_LOG_ENABLED=false
  ports:
    - "8083:8083"
    - "8086:8086"