# Running Avogadro on Docker

**URL:** <https://discuss.avogadro.cc/t/running-avogadro-on-docker/3377>\
**Category:** General Discussion\
**Created:** [January 3, 2021, 8:59pm UTC](https://discuss.avogadro.cc/t/running-avogadro-on-docker/3377 "2021-01-03T20:59:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andythe\_great](https://discuss.avogadro.cc/letter_avatar_proxy/v4/letter/a/dec6dc/32.png) [@andythe\_great](https://discuss.avogadro.cc/u/andythe_great)\
**Post date:** [January 3, 2021, 8:59pm UTC](https://discuss.avogadro.cc/t/running-avogadro-on-docker/3377/1 "2021-01-03T20:59:34Z")

</div>

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

 ![Screenshot_20210104_034921](https://discuss.avogadro.cc/uploads/default/original/1X/0231e3a17c8fb55a3647dd2d3ab52948cf772c4c.png)

---

<div class="post-metadata">

**Author:** ![pallavsen007](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/pallavsen007/32/908_2.png) [@pallavsen007](https://discuss.avogadro.cc/u/pallavsen007)\
**Post date:** [September 19, 2022, 8:51am UTC](https://discuss.avogadro.cc/t/running-avogadro-on-docker/3377/2 "2022-09-19T08:51:19Z")

</div>

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

> [@andythe\_great](#):
>
> 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

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
