Joplin Server pre-release is now available

.env-sample is at the root of the repo: joplin/.env-sample at dev · laurent22/joplin · GitHub

Step 10/31 : COPY --chown=$user:$user package*.json ./

ERROR: Service 'app' failed to build: unable to convert uid/gid chown string to host mapping: can't find uid for user $user: no such user: $user

That's strange because the variable seems to be correctly set above with this line ARG user=joplin

But in your case it seems it's using the literal value "$user" instead of the variable content.

Maybe it has something to do with installed docker version? What does docker --version say?

Thanks, no idea how I missed that.

 ~/m/nginx-sites> docker --version
Docker version 18.06.1-ce, build e68fc7a

Well, I worked around it by replacing $user with joplin and now it works. :smiley:

Seems it already synced up! Great, thanks!

Are there plans to publish an image on DockerHub, so I can just pull it and use it in my stack, without having to build myself?

Well, I worked around it by replacing $user with joplin and now it works. :smiley:

It's a bit of a mystery why it doesn't work for you. But let's see if other users come across this issue too.

Are there plans to publish an image on DockerHub

Most likely yes, although I'm clueless at this point how to do that. The server is built with docker-compose and it's not clear if it's possible to publish a docker-compose file to DockerHub.

It isn't, hub is for posting Docker images, not compose files. You would need to build the server into an image, then distribute the image through hub.

So it means you'd still have run the docker-compose file to run the server, is that correct? In that case, how do people distribute these docker-compose files? Just clone the whole repo? Or is there a better way to do this?

So, in most cases it's in the description or linked in the repo of the image.

That's what I did on Docker Hub for the florider89/joplin-server image.

It's a specific one for traefik at the moment, but I'll add a more general one to the README in the coming days - the more generic parts are currently just commented for that reason.

Thanks for the info, that makes sense. Eventually, I guess cloning the repo won't be necessary anymore if all that's needed is in the Docker image and docker-compose file.

It would probably be good to also expose setting the DB details in the server image as well - I think this is not done right now?

Could you clarify what should be exposed? Currently the server, as defined in Dockerfile.server, will connect to the provided JOPLIN_PORT. Is there something more that should appear?

Compose files aren't usually directly shared verbatim. A lot of people don't even use compose, and Compose syntax varies between versions of compose itself. Popular images typically supply some Compose template information, mostly to help out folk new to Compose, but people well versed in Compose usually have their own templates that fit their environment.

If you want good examples, take a look at images from a popular Image provider like the linuxserver.io team.

Regarding DB's. Many folk using Docker prefer to run their own DB container, which can service multiple applications at once and avoid running multiple database instances. A lot of images simply contain the code necessary to set up their database after being supplied credentials. You might want to go that route as well and make it easier on yourself. For example look at the Nextcloud image, running on its own it will use a built-in SQLite database, great for testing out the image or a very small environment. But if you supply connection information to an external database, it will use that.

Not trying to criticize you at all here, I'm excited for Joplin Server, but there's a "Docker best practices" way of doing things, you're just unfamiliar with them right now. Take a look at lot of popular images for self-hosted servers on hub and see how they do things.

6 Likes

Hi, thank you for your reply.

Well, the database here seems to be hard-coded with the provided credentials in the Dockerfile (or elsewhere, unsure right now) - basically, not changeable

I see this both as an inconvenience and, perhaps a security risk to some - if I wanted to run only a single container for all of my DB needs, this would make it harder.

Furthermore, the Docker build is failing for me on step 10 with the following error:
Step 10/31 : COPY --chown=$user:$user package*.json ./
COPY failed: no source files were specified

I am not quite sure where from the source file should appear - in the build system, I am following precisely the steps from here: joplin/README.md at dev · laurent22/joplin · GitHub

Here is the build - build #395004 - failed - the manifest for the build is here: " view manifest »"

EDIT: I might know why, because the build is also dependant on the .env file. That would also be nice to fix - as I see it, a Docker image should be as barebones as possible, usable for everyone without them having to build their own image.

I will check how the sources actually work and see if I can help somehow

EDIT2: Nevermind, I don't think it's dependent... Not sure what might be causing it then

May I use raspberry Pi as Joplin server?

@laurent: any reply?

No sorry I'm not familiar with this.

@laurent :slight_smile: Not familiar with what? With the kind of "program" I suggested?

"You get me wrong. I mean, instead of Joplin Server as a docker image wouldn`t it make sense to build a joplin server with docker? E.g. to have it installed on a webspace. I think that would work as you only need the joplin server files, a config file and the database connected.

I hope this and my initial posting make it clearer what I`m looking for."

instead of Joplin Server as a docker image wouldn`t it make sense to build a joplin server with docker

This I don't get. It's like you're saying, "instead of doing X, wouldn't it make sense to do X?"

webspace

I don't know what it is.

You don't need to use Docker. You can build the Joplin Server on any server - or machine for that matter - that runs node, so there's no need to build it using Docker or using Docker at all.

You don`t know what a webspace is? I mean not everybody is running / wants to run a server. With webspace I mean webhosting packages it Apache/nginx, PHP etc. where you can install applications"

instead of Joplin Server as a docker image wouldn`t it make sense to build a joplin server without docker

As mentioned by @florider you can indeed manually install the server if you want. For example you can follow the instructions in the Docker file and run them manually.

1 Like