anthonyraymond/joal

Docker container fails to start after system reboot

cmertens008 opened this issue · 4 comments

Hi,
I'm using the version 2.1.33 in Docker on a Raspberry Pi 3.
The docker container works fine until I reboot the computer, then it fails with error 255.
I used "--restart=always" with the docker run command to make it start with the computer.
There is no log. The command "docker logs joal" didn't show anything when it has failed.
Any idea?

What do you mean by anything? You don't event have the log from the previous session?

When the container is running fine, then "docker logs joa" shows some logs, but if I reboot the Raspberry, then the container fails to start and then "docker logs joa" shows nothing at all.

If found the solution, but I don't really understand the cause.
Doing "docker inspect joal" shows that the restart policy parameter I provided in the docker run command was not in the right section, but it is the joal command itself.

My solution was to remove the restart policy parameter from the docker run command and to specify it after, using a docker update: docker update --restart unless-stopped joal

I made my docker run command the same way I did for my transmission docker container, where the restart policy works fine.

Could it be that joal docker command line makes it not compatible with the restart parameter?
Here is my command that didn't work:
export VERSION=2.1.33
docker run -d \ -p 8080:8080 \ -v ~/.joal:/data \ --name="joal" \ anthonyraymond/joal:$VERSION \ --joal-conf="/data" \ --spring.main.web-environment=true \ --server.port="8080" \ --joal.ui.path.prefix="SECRET_PATH" \ --joal.ui.secret-token="SECRET_TOKEN" \ --restart unless-stopped

I see. the --restart argument is a docker argument, not a joal one.

docker run -d \
  -p 8080:8080 \
  -v ~/.joal:/data \
  --name="joal" \
  anthonyraymond/joal:$VERSION \
  --joal-conf="/data" \
  --spring.main.web-environment=true \
  --server.port="8080" \
  --joal.ui.path.prefix="SECRET_PATH" \
  --joal.ui.secret-token="SECRET_TOKEN" \
  --restart unless-stopped 

Every argument passed after the image name is passed down to the application. So providing in at the end has no effect.

The command should be:

export VERSION=2.1.33 && docker run -d \
  -p 8080:8080 \
  --restart=unless-stopped \
  -v ~/.joal:/data \
  --name="joal" \
  anthonyraymond/joal:$VERSION \
  --joal-conf="/data" \
  --spring.main.web-environment=true \
  --server.port="8080" \
  --joal.ui.path.prefix="SECRET_PATH" \
  --joal.ui.secret-token="SECRET_TOKEN"

I've seen from the doc that they use an = between option name and value, maybe it was your issue.