R: Omnis App Server 8.x on Docker
Andrea Zen
a.zen at athesiavr.it
Fri Jun 28 10:28:28 EDT 2019
Hi Mirko, you are right, the user is the problem as it is missing from the chown command executed at the end by Omnis setup. RUN commands in Dockerfile are executed as root, probably Omnis setup has some problems if executed that way.
I solved creating the image with several separate steps, so:
- build an Ubuntu 16.04 image with a minimal Dockerfile: I only create a user "admin" that can sudo, and copy Omnis setup and related files I need;
- run the container as "admin" user with interactive shell and then install Omnis using "sudo", now in attended mode since I have control;
- after installing and copying my libraries, stop the container;
- convert the stopped container to an image with docker commit.
Now I have a personalised image I can build containers upon and run them, it works.
Andrea Zen
-----Messaggio originale-----
Da: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> Per conto di Mirko Pepa
Inviato: giovedì 27 giugno 2019 15:15
A: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
Oggetto: Re: Omnis App Server 8.x on Docker
Hello Andrea
Chown throws this error. The syntax is
Chown -R User FileOrFolder
The script does
chown -R /home/omnisserver
So the user is missing (there are 2 spaces after '-R') So You should find out:
- How does the .run-Script find out the user?
- What users do You have in a docker-container?
- Can You specify the user in the RUN-Command?
Greetings
Mirko
Am 19.6.19, 21:35 schrieb "omnisdev-en im Auftrag von Andrea Zen" <omnisdev-en-bounces at lists.omnis-dev.com im Auftrag von a.zen at athesiavr.it>:
Hello, more of a Docker question than an Omnis one maybe, anyway has anyone tried it? I'm not able to make the container start properly...
I'm following the instructions in technote "Linux Headless Server Deployment inside Docker" (works perfectly with Omnis 10), just adapting them to Omnis Server 8.7, since it comes as a ".run" installer file and not as a complete folder compressed in a ".tar.gz" archive.
So if I use the "Omnis-Headless-App-Server-8.1.7-x64.run" file, during the build of docker image I get this error:
-------------------------------------------------------------------------------------------
Step 7/9 : RUN ./Omnis-Headless-App-Server-8.1.7-x64.run --mode unattended --installdir "/home/omnisserver" --serialno <myserial> --serverport 9800
---> Running in 738dba509df2
Problem running post-install step. Installation may not complete correctly
Error running chown -R /home/omnisserver: chown: missing operand after '/home/omnisserver'
Try 'chown --help' for more information.
The command '/bin/sh -c ./Omnis-Headless-App-Server-8.1.7-x64.run --mode unattended --installdir "/home/omnisserver" --serialno <myserial> --serverport 9800' returned a non-zero code: 1
-------------------------------------------------------------------------------------------
Dockerfile is as follows:
FROM ubuntu:16.04
WORKDIR /home
ADD Omnis-Headless-App-Server-8.1.7-x64.run /home
ENV LD_LIBRARY_PATH /home/omnisserver
RUN apt-get -q -y update
RUN apt-get -q -y install \
libpango1.0-dev \
cups
RUN ./Omnis-Headless-App-Server-8.1.7-x64.run --mode unattended \
--installdir "/home/omnisserver" \
--serialno <myserial> \
--serverport 9800
EXPOSE 9800
CMD omnisserver/homnis
If I get back to the situation in the technote, so copying the entire program folder into the container (to get it I've installed Omnis Server 8 through the .run file in an Ubuntu VM and then I've taken all files from the installation directory), the build of the image completes without errors, but when I run the container I get a "segmentation fault".
Dockerfile in this case is ("ohsrv8" is the folder where I've copied all files from the installation directory):
FROM ubuntu:16.04
WORKDIR /home
ADD ohsvr8 /home/omnisserver
ENV LD_LIBRARY_PATH /home/omnisserver
RUN apt-get -q -y update
RUN apt-get -q -y install \
libpango1.0-dev \
cups
EXPOSE 9800
CMD omnisserver/homnis
This last case is almost identical to the one described in technote, but no way...any hint or idea why both of them don't work?
Andrea Zen
_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en
mailing list