Running Avogadro on Docker

I tried to use docker to run the older avogadro because many modern linux distro depreciate some of its dependencies already.

I ran avogadro on openSUSE Tumbleweed with Ubuntu 18.04 container.
First install docker on your distro.
To avoid running docker with sudo all the time.

sudo groupadd docker
sudo usermod -aG docker $USER

then logout and login
Enable docker service with
sudo systemctl docker

Create Dockerfile with content as follows.

FROM ubuntu:18.04
RUN apt update && apt install -y -q avogadro
CMD [“avogadro”]

Build the image

docker build . -t avogadro

then we need to allow avogadro to display on the host

xhost +

(to reset it just do xhost -)

run avogadro

docker run --rm -it -v ~/saves:/home/saves --name avogadro -e QT_X11_NO_MITSHM=1 -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro avogadro

To fix issue buttons not displaying.

–env QT_X11_NO_MITSHM=1

To save the file, create a directory and save it to /home/saves folder, it will appear in the host /home/saves folder.

-v ~/saves:/home/saves

1 Like

Hi @andythe_great
I have been following the procedure to use Avogadro 1.2 using a docker image on Ubuntu 20.04.

Running the above command yeilds,/bin/sh: 1: [“avogadro”]: not found
Moreover running docker run with the image id yeilds the same.
Actually I have never used Docker before, hence the problem.
Regards,
Thanking in advance,
Pallav