Update GraphDB Dockerfile
This commit is contained in:
parent
f92d2c6646
commit
9ece280e72
2 changed files with 10 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
# This container contains a Dockerfile for building a GraphDB zip.
|
# This Dockerfile contains instructions to compile and run GraphDB inside a Docker container.
|
||||||
# It is roughly based on https://github.com/Ontotext-AD/graphdb-docker/blob/master/free-edition/Dockerfile
|
# It is roughly based on https://github.com/Ontotext-AD/graphdb-docker/blob/master/free-edition/Dockerfile
|
||||||
# but has been modified for performance and security.
|
# but has been modified for performance and security.
|
||||||
|
|
||||||
|
|
@ -47,7 +47,7 @@ EXPOSE 7200
|
||||||
|
|
||||||
# setup a healthcheck, that checks if the server is up.
|
# setup a healthcheck, that checks if the server is up.
|
||||||
RUN apt-get update && apt-get install -y curl
|
RUN apt-get update && apt-get install -y curl
|
||||||
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD curl --fail 127.0.0.1:7200 || exit 1
|
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD curl --fail 127.0.0.1:7200/rest/repositories || exit 1
|
||||||
|
|
||||||
# Add volumes for data, work and logs as these might be accessible from the outside.
|
# Add volumes for data, work and logs as these might be accessible from the outside.
|
||||||
# To add your own configuration, manually mount a config file into /opt/graphdb/work
|
# To add your own configuration, manually mount a config file into /opt/graphdb/work
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,13 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# chown the volumes to graphdb
|
# Because we want to run graphdb as a limited user
|
||||||
chown -R graphdb:graphdb /opt/graphdb/data
|
# we need to make sure that the volumes are writable.
|
||||||
chown -R graphdb:graphdb /opt/graphdb/work
|
# Because of that, we 'chown'
|
||||||
chown -R graphdb:graphdb /opt/graphdb/logs
|
|
||||||
|
|
||||||
# run graphdb as a limited user
|
chown graphdb:graphdb /opt/graphdb/data
|
||||||
|
chown graphdb:graphdb /opt/graphdb/work
|
||||||
|
chown graphdb:graphdb /opt/graphdb/logs
|
||||||
|
|
||||||
|
# switch to the graphdb user, and run graphdb
|
||||||
su graphdb -c "/opt/graphdb/bin/graphdb $@"
|
su graphdb -c "/opt/graphdb/bin/graphdb $@"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue