The entry point may be overridden with the --entrypoint
switch in a docker run
invocation but the mistake I made was to immediately follow it with arguments. Those actually go last.
...the documentation clearly states that the ENTRYPOINT only specifies the executable to run, when the container starts.
docker run -d \
--name h2-gui --rm \
-v "${PWD}/data:/data" \
-p "8082:8082" \
--entrypoint "java" \
h2-docker:latest \
-cp bridge-agent.jar org.h2.tools.GUIConsole -webAllowOthers
You can do the same thing with Docker Compose. Although there is a slight change; the java VM arguments stay with the entry point. Otherwise:
yaml: line 7: did not find expected node content
version: "2.1"
services:
h2-ui:
image: h2-docker:latest
entrypoint: ["java", "-cp", "h2.jar"]
command: ["org.h2.tools.GUIConsole", "-webAllowOthers"]
volumes:
- ./data:/data
ports:
- "8082:8082"
volumes:
data: