fonsp/PlutoUtils.jl

Build "Official" Docker image for Pluto

lungben opened this issue · 14 comments

It would be good to have an official Pluto image in Dockerhub, based on the Dockerfile in this Repo.

I created an example setup using my Docker account and fork of this repo:
https://hub.docker.com/r/lungben/pluto

This configuration could be re-used for the official one (screenshot attached).
image

The Pluto Docker image is not automatically re-built if there are updates in the Pluto or PlutoUI packages (because they are in a different repo). For this, a Trigger URL can be defined which should be called after each Pluto/ PlutoUI release (could be manually, probably it is also possible to automatize it).

fonsp commented

Awesome! Is it simple for people to upgrade their docker image regularly?

fonsp commented

Oh and what do you mean by official? How about making you the Official Docker Person™ for Pluto?

With official I meant a Docker repo with your name, this is too much honor for me ;-)

Currently, I can only build a Docker image where the Dockerfile is in my own Github account. Your organization could be linked to your Github account directly, without need for my fork.

Otherwise, for maintenance of the Docker container, I am happy to do this :-)

Initial Docker image is uploaded:

https://hub.docker.com/r/plutojl/pluto

I currently linked the build to the Dockerfile in my PlutoUtils.jl fork, but it would be good if you could change it to your repository.

Edit:
Start Pluto as follows:

docker run -d -p 1234:1234 plutojl/pluto:latest

http://localhost:1234/

fonsp commented

Nice! Maybe you can investigate how we can make it automatically follow the GitHub releases of fonsp/Pluto.jl?

Could you set up a Github action to send a POST request to a specific endpoint in case of a new Pluto or PlutoUI release?
This would then trigger a re-build of the Pluto container image.

See
https://github.com/big-data-europe/README/wiki/Trigger-builds-on-Docker-Hub

I was having permissions issues with plutojl/pluto image. I haven't tested the behavior on linux, but on mac the VOLUME line prevents the pluto user from modifying that directory via RUN commands. Switching to root user resolves the permission issues.

@j4qfrost Thanks for reporting, I'll take a look at it.

For me it is working now, please pull the updated image.

On Linux, you have to do the following on your host machine before starting the container:

mkdir notebooks
chown -R 1000:1000 notebooks
docker-compose up -d

Unfortunately it is required to create the monted volume on the host directory and to transfer ownership to the user ID in the container due to a Docker limitation (see moby/moby#2259).

For Windows, these steps are not required.

fonsp commented

@lungben should you merge the PR first?

PR is merged and official Docker image is updated.
I added the steps above to the readme on Dockerhub.

@j4qfrost pls let me know if you still encounter issues.

@lungben appears to be fixed. The ordering of the VOLUME command is what was tripping things up.