Open Content Docker
How to run Open Content in Docker on my own computer.
The Docker images for Open Content are primarily for development purposes, not production. So if you are a developer looking for how to start Open Content locally for integration testing or trying things out, then this is for you.
# create a directory where to work, in home oc-lab
cd
mkdir oc-lab
cd oc-lab
# Download the zip file from S3
curl -s https://s3-eu-west-1.amazonaws.com/open-content-artifacts/opencontent-docker-configs.zip \
--output opencontent-docker-configs.zip
# Unzip
unzip opencontent-docker-configs.zip
# Go to directory
cd opencontent-docker-lab
Start Open Content
docker-compose -f docker-compose-lab.yml up --detach
Wait until all containers are downloaded and started. Now there is an empty Open Content without configuration or content.
Logging
docker-compose -f docker-compose-lab.yml logs -f wildfly
Open Content UI
Configuration is done using the admin UI or the admin API. The UI can be found here http://localhost/admin.
Below is the menu for the Open Content admin UI.

Configure Open Content
The first thing that has to be configured is storage. This can either be done in the UI at http://localhost/admin
or with this curl command:
curl -u admin:admin -d name=OpenContent -d path=/tmp http://localhost:8080/opencontent/admin/storage
Open Content configuration in this setup is done using a local copy of our Bitbucket repository for configuration. Use the Open Content admin UI to inspect the detailed settings for the different configuration options.
Go to the opencontent-configuration
directory where the configure.sh script is
cd ../opencontent-configs/scripts
Configure Open Content for public use
./configure.sh \
http://admin:admin@localhost:8080/opencontent \
public
Configure Open Content for public and app use
./configure.sh \
http://admin:admin@localhost:8080/opencontent \
public-app
Configure Open Content for editorial use
./configure.sh \
http://admin:admin@localhost:8080/opencontent \
editorial
Activation of the configuration
curl -u admin:admin \
-X POST "http://localhost:8080/opencontent/admin/configuration/activate" \
-H "accept: */*" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "reason=configured from script&name=$(whoami)"
Last updated