Graylog2 / graylog-docker

Official Graylog Docker image
https://hub.docker.com/r/graylog/graylog/
Apache License 2.0
369 stars 133 forks source link

Fix startup issue in Enterprise Docker image. #177

Closed malcyon closed 3 years ago

malcyon commented 3 years ago

When starting Graylog enterprise, users get this error:

graylog_1  | adding environment opts
graylog_1  | /docker-entrypoint.sh: line 109: /usr/local/openjdk-/bin/java: No such file or directory

See #176

I tested this locally, reproduced the issue, and was able to resolve the issue with this codefix.

malcyon commented 3 years ago

Test Plan

Run these commands to build a test image:

git clone git@github.com:Graylog2/graylog-docker.git
cd graylog-docker
git checkout fix/enterprise-java
docker build --build-arg GRAYLOG_VERSION=4.1.3 --tag graylog-test:4.1 --file docker/enterprise/Dockerfile .

Now, checkout the docker-compose template and configure it:

cd ..
git clone https://github.com/Graylog2/docker-compose
cd docker-compose
cd enterprise/
vi .env

Set contents of .env to:

GRAYLOG_PASSWORD_SECRET="phQhAZm2dFljKiEmEyOYmcXSe6X6vf4FVmkj6EZZqLZfuaemVlzTRpn5capFOYFiCgEMa7L9wp5Wz0a6bVYislV5EggKq5bO"
GRAYLOG_ROOT_PASSWORD_SHA2="8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918"

Open docker-compose.yml in an editor:

vi docker-compose.yml

Update this line: image: "graylog/graylog-enterprise:4.1"

to: image: "graylog-test:4.1"

Now, start Graylog:

docker-compose up