openmeetings / openmeetings-docker

Docker image for OM
Apache License 2.0
110 stars 56 forks source link

Dockerfile does not produce a runnable container #6

Closed kreetrapper closed 6 years ago

kreetrapper commented 6 years ago

I was excited to find this project and while the pre-built image hosted on bintray.io works like a charm out of the box, I wasn't able to get the same result with a locally built image. The build process runs fine, but when I start the image it exits with the error:

sudo: ./red5-debug.sh: command not found

I compared the pre-built image with my self-built version and there seem to be a lot of scripts missing.

solomax commented 6 years ago

Hello @kreetrapper,

just built everything and run using docker run -it HASH bash (HASH is replaced with real hash) Could you provide me with your steps?

kreetrapper commented 6 years ago

Thanks for looking into this @solomax. I have to admit I was confused by the presence of HASH and have no idea what I should enter there. Could you elaborate on its purpose a bit?

solomax commented 6 years ago

While building you will get output like this (the tail):

Step 42/42 : ENTRYPOINT [ "bash", "-c", "${work}/om.sh" ]
 ---> Running in 403cdaf2c944
Removing intermediate container 403cdaf2c944
 ---> 467a1dc74f4d
Successfully built 467a1dc74f4d

467a1dc74f4d in the output above is THE_HASH :))

kreetrapper commented 6 years ago

Ah, okay. That was a misunderstanding. I am using tags instead of the plain hash to reference the image. But as you can see in the text file I linked the image doesn't start properly. It's the same if I use the hash instead.

Step 42/42 : ENTRYPOINT [ "bash", "-c", "${work}/om.sh" ]
 ---> Running in 365466394ba5
Removing intermediate container 365466394ba5
 ---> 77c0cbf76b3a
Successfully built 77c0cbf76b3a

$ docker run -ti 77c0cbf76b3a bash
 * Starting MySQL database server mysqld                                                                                                          No directory, logging in with HOME=/
                                                                                                                                           [ OK ]
sudo: ./red5-debug.sh: command not found
solomax commented 6 years ago

cat you provide the link to bigger log? It seems there were errors during installation (OM hasn't been downloaded?)

kreetrapper commented 6 years ago

Sure, I uploaded the full log file here. On first glance I see only one error during the build:

08:58:43.001 [main] ERROR org.apache.openmeetings.core.remote.KurentoHandler - Fail to create Kurento client

But that doesn't seem to be fatal as the process happily continues and even says

        ################################################################################
        #                              Openmeetings is up                              #
        #                 5.0.0-SNAPSHOT 88c3eeb 2018-07-16T11:44:24Z                  #
        #                               and ready to use                               #
        ################################################################################
solomax commented 6 years ago

OK, now I see the issue :)) you seems to use master which uses unstable OM 5.0.0 please checkout 4.0.x branch, then build and run I'll try to fix scripts so they will work with 5.0.0 again

kreetrapper commented 6 years ago

Thanks for all your help.

I checked out the 4.0.x branch and by default this tries to build the version 4.0.3 which seems to not be available on the apache server:

Step 36/42 : RUN wget http://www-eu.apache.org/dist/openmeetings/${OM_VERSION}/bin/apache-openmeetings-${OM_VERSION}.tar.gz
 ---> Running in 7798b30216b5
--2018-07-17 10:28:16--  http://www-eu.apache.org/dist/openmeetings/4.0.3/bin/apache-openmeetings-4.0.3.tar.gz
Resolving www-eu.apache.org (www-eu.apache.org)... 95.216.24.32, 2a01:4f9:2a:185f::2
Connecting to www-eu.apache.org (www-eu.apache.org)|95.216.24.32|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-07-17 10:28:17 ERROR 404: Not Found.

The command '/bin/sh -c wget http://www-eu.apache.org/dist/openmeetings/${OM_VERSION}/bin/apache-openmeetings-${OM_VERSION}.tar.gz' returned a non-zero code: 8

I changed the version to 4.0.4 in the Dockerfile and now it all works. :-)

Maybe you want to add a note to the README that 4.0.x is the current stable branch.

solomax commented 6 years ago

I guess you need to git pull ..... https://github.com/openmeetings/openmeetings-docker/blob/4.0.x/Dockerfile#L18