jlesage / docker-firefox

Docker container for Firefox
MIT License
1.61k stars 288 forks source link

I want to use "run" on Synology #117

Closed lunloon closed 2 years ago

lunloon commented 2 years ago

I have set it up in Docker on my Synology NAS, and it works if i start it manually (clicking via Docker).

I am planning to run this daily on a schedule, start at a certain time and end at a certain time. I could get it working when i use "docker container start", but when i use "docker container stop" i will get a notification that the container is stopped unexpectedly.

I would like it if it does not send an email to me daily that it is stopped unexpectedly. So having found out that using "docker run" will not cause it to happen, i followed the command from the main page:

docker run -d \
    --name=firefox \
    -p 5800:5800 \
    -v /docker/appdata/firefox:/config:rw \
    --shm-size 2g \
    jlesage/firefox

The container appears but is not started.

How can i get it to start running by itself?

jlesage commented 2 years ago

The docker run command creates and starts the container.

Are you sure the container is not already created before you run the command ? You can use docker ps -a to see existing containers.

Also, even when using the docker run command, you still have to use docker stop to stop the container. Won't this cause a notification?

Finally, don't forget to remove the container with docker rm if you plan to re-create it with docker run.

lunloon commented 2 years ago

Hi thanks for the reply.

I found the error: Start container firefox failed: {"message":"Bind mount failed: '/docker/appdata/firefox' does not exists"}.

I found the solution referring to this as well https://github.com/jlesage/docker-firefox/issues/16

I forgot the root volume. Adding that in works.

Regarding docker stop instead of docker container stop, but as far as I have Googled, people have been saying that to stop getting notification, refer => (https://stackoverflow.com/questions/61878651/stop-synology-notification-docker-container-stopped-unexpectedly.

Anyways, docker stop firefox works as what i wanted.

Thanks a lot for the reply.