[WIP] minimal docker image for exist-db
Available on dockerhub
docker pull grantmacken/alpine-exist:latest
Test build on travis-ci
If you don't want to use a shell commands, a minimal offical eXist [distroless version is available](from https://github.com/eXist-db/docker-existdb)
Pre-build images are available on dockerhub
The latest build will always be the latest eXist release.
docker pull grantmacken/alpine-exist:latest
docker run -p 8080:8080 grantmacken/alpine-exist:latest -d
Earlier tagged tagged images images based on earlier eXist versions may be available
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.
User password is also admin 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 volume create --driver=local config
docker run \
--name ex \
--network www \
--volume data:/usr/local/eXist/webapp/WEB-INF/data \
--volume data:/usr/local/eXist/config \
--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
git clone https://github.com/grantmacken/alpine-eXist.git
cd alpine-eXist
docker build .
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:
Content type
Image
Digest
Size
201.1 MB
Last updated
almost 8 years ago
docker pull grantmacken/alpine-exist