Page 1 of 1

Docker usage

Posted: Sat Jan 09, 2021 2:01 pm
by gioppoluca
In Linmux (mainly CentOS) distributions is not possible to run the application since libpng is missing.
Is possible to run the application through a Docker container.
Here the Dockerfile content:

Code: Select all

FROM ubuntu:20.10
RUN apt-get -y update
RUN apt-get -y install expat x11-apps libgtk2.0-0
Buils the image with this command:

Code: Select all

docker build -t owm .
Place the OWm files in a folder so you can mount it in the container.
The run script is:

Code: Select all

#!/bin/sh
XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
docker run -e DISPLAY=unix$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /tmp/.docker.xauth:/tmp/.docker.xauth:rw -e XAUTHORITY=/tmp/.docker.xauth -v "$(pwd)"/OtherWorldMapper:/owm owm:latest /owm/OWM

Re: Docker usage

Posted: Tue Apr 06, 2021 12:58 pm
by Kanchou
gioppoluca wrote:
Sat Jan 09, 2021 2:01 pm
In Linmux (mainly CentOS) distributions is not possible to run the application since libpng is missing.
Is possible to run the application through a Docker container.
Here the Dockerfile content:

Code: Select all

FROM ubuntu:20.10
RUN apt-get -y update
RUN apt-get -y install expat x11-apps libgtk2.0-0
Buils the image with this command:

Code: Select all

docker build -t owm .
Place the OWm files in a folder so you can mount it in the container.
The run script is:

Code: Select all

#!/bin/sh
XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
docker run -e DISPLAY=unix$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /tmp/.docker.xauth:/tmp/.docker.xauth:rw -e XAUTHORITY=/tmp/.docker.xauth -v "$(pwd)"/OtherWorldMapper:/owm owm:latest /owm/OWM
Sorry I missed this thread! Question, is there a reason you can't install libpng for CentOS?

Thank you!

- Alejandro