Wren:DS in Docker (release 5.0.0) attempts to initialize every time, even when instance dir is already populated, which results in error on subsequent starts.
Steps To Reproduce ("Repro Steps")
Run Wren:DS with empty volume for instance data: docker run --rm -v wrends-data:/opt/wrends/instance wrensecurity/wrends:5.0.0, wait for it to initialize.
Stop Wren:DS (Ctrl+C)
Run the same command again (re-using the now populated volume)
Alternatively, instead of using volumes, create a container, start it, stop it and start it again.
Expected Result (Behavior You Expected to See)
Wren:DS start with existing instance data which has been created during the first start.
Actual Result (Behavior You Saw)
After following repro steps above, Wren:DS fails to start with the following output:
$ docker run --rm -v wrends-data:/opt/wrends/instance wrensecurity/wrends:5.0.0
First start...
Server Already Configured
setup command-line can only be used with servers that have not yet been
configured. The current server:
- Contains data
- Has already been configured
Screenshots
N/A
Environment
Product version (include GIT commit ID if using a dev build): Image from Docker Hub, version 5.0.0.
Operating system: N/A (Docker)
JRE version: N/A (Docker)
Was instance upgraded from a previous version? If so, what version were you using before? N/A
By the way there is a simple workaround for this issue - set INSTANCE_DIR evnironment variable so that the entrypoint knows where the instance directory is.
Summary
Wren:DS in Docker (release 5.0.0) attempts to initialize every time, even when instance dir is already populated, which results in error on subsequent starts.
Steps To Reproduce ("Repro Steps")
docker run --rm -v wrends-data:/opt/wrends/instance wrensecurity/wrends:5.0.0
, wait for it to initialize.Alternatively, instead of using volumes, create a container, start it, stop it and start it again.
Expected Result (Behavior You Expected to See)
Wren:DS start with existing instance data which has been created during the first start.
Actual Result (Behavior You Saw)
After following repro steps above, Wren:DS fails to start with the following output:
Screenshots N/A
Environment
Additional Notes
The problem lies in unset variable
INSTANCE_DIR
here: https://github.com/WrenSecurity/wrends/blob/ecd3969eb786f246948a761157eb72d8279d7496/.docker/docker-entrypoint.sh#L3.