[WIP] minimal docker image for exist-db
Built from openjdk:8-jre-alpine image
Pre-build images are available on dockerhub
The latest build will always be the latest eXist release. Earlier versions may be available.
You can simply download them and run the image as usual, e.g.:
docker pull grantmacken/alpine-exist:latest
docker run -p 8080:8080 grantmacken/alpine-exist:latest -d
This repo provides a docker-compose file: 'docker-compose.yml'
To bring the container up/down on port 8080 use
# power up
docker-compose up -d
# view eXist log
docker logs ex
# power down
docker-compose down
The eXist dashboard will now be available on localhost port 8080
The eXist dba user is the default admin.
There is no password so change it ASAP
You may do this via the eXist usermanager or see section 'Talking To eXist' below
Once eXist is up and running in a docker container, you should now be able to stop and start eXist with the following commands
docker start ex
docker stop ex
The docker-compose run time environment includes
${EXIST_HOME}/${EXIST_DATA_DIR}
hangs around.On your remote host docker-compose might not be available. The equivalent docker commands to issue are
docker network create --driver=bridge www
docker volume create --driver=local data
docker run \
--name ex \
--network www \
--volume data:/usr/local/eXist/webapp/WEB-INF/data \
--publish 8080:8080 \
-d \
grantmacken/alpine-exist:latest'
Be aware when using a reverse proxy in another container, don't use 'localhost', use 'ex' ( our named container ) instead, and make sure it belongs to the same named docker 'www' network.
# nginx example
location @proxy {
rewrite ^/?(.*)$ /exist/restxq/$domain/$1 break;
proxy_pass http://ex:8080;
}
When the docker image is up and running docker-compose up -d
you can issue execute commands on the running container.
Examples:
# list EXIST_HOME dir contents
docker exec ex ls -al .
# get eXist version
docker exec ex java -jar start.jar client -q -u admin -P admin -x \
'system:get-version()' | tail -1 ; echo
# list installed repos
docker exec ex java -jar start.jar client -q -u admin -P admin -x \
'string-join(repo:list(), " ")' ; echo
# change the admin pass to 'nimda'
docker exec ex java -jar start.jar client -q -u admin -P admin -x \
'sm:passwd("admin", "nimda")'
# change the admin pass back to admin
docker exec ex java -jar start.jar client -q -u admin -P nimda -x \
'sm:passwd("admin", "admin")'
To update the base image (of e.g. exist-db) use:
docker-compose pull
docker-compose up -d
you can inspect the container by running:
docker inspect ex
the name 'ex' is defined in docker-compose.yml
Clone or Fork this repo.
To modify -Xmx and CACHE_MEMORY configurations for your exist instance, change MAX_MEM and CACHE_MEM in .env and then build your image in the usual fashion:
cd alpine-eXist
docker build .
make build INC=inc
We start from the openjdk:8-jre-alpine image. On top of this layer, we install eXist from the latest install binary provided by the eXist developers.
Our first tagged base image is the openjdk jre + eXist with a few things stripped out of the eXist install. It should provide a similar experience as if the user installed eXist from the install binary.
From this base, the next stage is to get the image smaller to suit specific requirements.
make build-dev INC=inc
make build-prod INC=inc
These to have their own Dockerfile The images will be layered on top of the generic development and production images
example: image with FO support
make build-dev-fop
make build-prod-fop
Content type
Image
Digest
Size
202.1 MB
Last updated
over 8 years ago
docker pull duncdrum/alpine-exist-db