Whyis can be used with Docker and Docker Compose to instantiate a fully functional Whyis Docker instance that can be run as many times as required. For an introduction to Docker concepts and terminology, see:
Whyis is packaged as two sets of Docker images:
New users should start with the monolithic image.
For an introduction to Docker Compose, see:
All of the whyis images mount directories from the host in the
/datafor persistent storage, mounted as
/datain the container
On Mac OS X you must allow Docker to mount these directories by going into Docker’s Preferences -> File Sharing and adding their absolute paths. For example:
/dataassuming you have a
/datadirectory on your host
Each run of the container should be considered a fresh slate for your Whyis application to be run on. In other words, most changes done to the container will be erased after each run.
To start the monolithic image from Dockerhub, run:
docker run -p 80:80 -it tetherlessworld/whyis
This will automatically download the
latest version of the
whyis image from the Docker Hub. To just pull the image or update the image to the latest version, run:
$ docker pull tetherlessworld/whyis
The whyis monolithic image is built in two parts:
We assume that whyis-deps changes infrequently, whereas whyis changes frequently. The Continuous Integration server only builds and pushes whyis, retrieving whyis-deps from Dockerhub in the process. When whyis-deps changes, you will need to push it to Dockerhub manually.
Assuming you have logged in with
docker login, you can use docker/compose/dev to build whyis-deps and push it to Dockerhub:
cd docker/compose/monolithic ./build-deps.sh ./push-deps.sh
Note: You will have to be be a member of the Tetherless World organization to be able to run these steps.
The monolithic image was split into images for the databases Whyis relies on (redis, blazegraph) and the Whyis server application (whyis-server).
cd docker/compose/split docker-compose -f db/docker-compose.yml -f app/docker-compose.yml
which starts both the database (
db/) and server (
Similar to the monolithic image, the whyis-server image is built from multiple parent images, which change less frequently than the code.
cd docker/compose/split ./build-deps.sh ./push-deps.sh
db/docker-compose.yml can be used to start the databases without the server, so that the server can e.g., be run locally:
cd docker-compose/split docker-compose -f db/docker-compose.yml
docker/compose/split/app-dev references a version of
whyis-server that mounts
/apps from the parent directory of the current whyis checkout, for local development.
By default the
latest tags for the whyis images. This can be overriden by specifying the environment variable