Driver program to manage a containerised opengrok appliance.
Variables at the start of the opengrok-docker
script allow these settings to be customised:
- opengrok version
- sync options
- directories to mount from the host
- ports
$ opengrok-docker settings
...
$ opengrok-docker pull
$ opengrok-docker create
$ opengrok-docker start
$ opengrok-docker reindex
$ opengrok-docker logs
...
$ opengrok-docker stop
...
$ opengrok-docker delete
The pull and create should only be done once per version bump. After that the container can be started and stopped as required.
- opengrok-docker stop
- opengrok-docker pull
- docker rename opengrok opengrok-1.7.17 # renames the old container
- opengrok-docker create
- opengrok-docker start
Optional - to remove an old container and/or image:
- docker rm opengrok-1.7.17
- docker rmi opengrok/docker:1.7.17
To have the container start automatically:
rc-config add opengrok
The default docker "json-file" logging driver does not do log rotation.
To select the "local" driver, with a max file size of 10MB and four files, add this to /etc/docker/daemon.json
:
{
"log-driver": "local",
"log-opts": {
"max-size": "10m",
"max-file": "4"
}
}