Problem running container on Docker Windows

If you want to use docker-compose up --build then you need to build the software first. The steps are

$ git clone https://github.com/openremote/openremote.git
$ cd openremote
$ ./gradlew clean installDist
$ docker-compose up --build

running into JAVA problems now. Gradle wants tools.jar which is only available in de JDK. I have only JRE installed.
The Oracle site is down so I can’t download JDK. I’ll have to wait until they have fixed te site…

Not necessary, we have also the whole build toolchain available as a docker container too. We used it before github allowed to use actions with complete build chain. Anyway, the image is registry.gitlab.com/openremote/openremote and you can replace the ./gradlew command with the following:

$ docker run -v $(pwd):/or registry.gitlab.com/openremote/openremote:master /bin/sh -c "./gradlew --console plain clean installDist"

This is a snippet for the CI/CD pipeline. If you are interested, the whole pipeline is in .gitlab-ci.yml
So, using docker you don’t need to install anything.

hmmm…
Error response from daemon: manifest for registry.gitlab.com/openremote/openremote:latest not found: manifest unknown

Ah, yes, gitlab uses different default tagging, it should be master instead of latest. The corrected command

docker run -v $(pwd):/or registry.gitlab.com/openremote/openremote:master /bin/sh -c "./gradlew --console plain clean installDist"

docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: “C:/Program Files/Git/usr/bin/sh”: stat C:/Program Files/Git/usr/bin/sh: no such file or directory: unknown.

This is some Windows stuff, which I’m afraid I cannot help. Seems like some syntax differences in shell. Perhaps you can play with ', " and $ to get it running? What the error message is saying is that it tries to find /bin/sh in Windows instead in the container. Maybe you can run this is sequence?

$ docker run -ti -v $(pwd):/or registry.gitlab.com/openremote/openremote:master bash
# ./gradlew clean installDist

It runs on my Mac.

Good morning Michal,
I’ve installed JRE and the build sucseeded! I can now log in to the manager.

Maybe it would be a good idea to update the documentation with the info in this post.
It has been kind of a struggle… :slight_smile:
There are a lot of depricated items (maybe harmless) in the log so I inlcuded the output of the commands.

Thanks for your help so far.

Install_logs.txt (586.6 KB)

Well done for sticking with it, just skimmed through this and I don’t know why you made it so complicated by building images yourself…prebuilt images are there in docker hub…if you want to build images locally then you need the tool chain as described in the developer docs or use the container @michal mentioned.

Hi Richard,
At first I tried to use a prebuild image but that gave me errors and the service wouldn’t start.
Then I reached out to this forum and followed the suggestions from Michal.

IMHO, this story is a food for thought that the current architecture, and the build-in chicken-egg relationship should be revisited and refactored to a more resilient one. Not everyone is as brave as Rene and sticks with it to the successful end. Majority would drop out after a short time of trying.

chiming with @Rene61 here. The documentation needs to be updated /revamped. A lot of the people I talk to drop openremote cause they could not get past the docker deployment step.

I am kinda stubborn :slight_smile:
Is there a way to migrate my 2.5 setup to 3.0? I’m using an Android client.