Running GUI Applications inside Docker Containers

  • GUI Applications that (obviously!) run in the foreground
  • --volume="$HOME/.Xauthority:/root/.Xauthority:rw"
  • share the Host’s DISPLAY environment variable to the Container
  • --env="DISPLAY"
  • run container with host network driver with
  • --net=host
FROM centos
RUN yum install -y xeyes
CMD ["/usr/bin/xeyes"]
FROM ubuntu:14.04
MAINTAINER Admatic Engineering Team@ADMATIC.IN
ENV DEBIAN_FRONTEND=noninteractiveRUN apt-get update# Default jdk
RUN apt-get install -y default-jdk
# 32-bit dependencies of android and utils
RUN apt-get install -y \
bison \
git \
gperf \
lib32gcc1 \
lib32bz2-1.0 \
lib32ncurses5 \
lib32stdc++6 \
lib32z1 \
libc6-i386 \
libxml2-utils \
make \
zip
# Download and unzip Android Studio for Linux
ADD http://dl.google.com/dl/android/studio/ide-zips/1.2.1.1/android-studio-ide-141.1903250-linux.zip /opt/android-studio.zip
RUN cd /opt/ && unzip android-studio.zip && rm android-studio.zip
CMD /opt/android-studio/bin/studio.sh

--

--

--

Curious Learning Machine + Founder & CEO @AdmaticCloud @RoboticKitchen God is Great! More you give, more++ you get.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Saravanan Sundaramoorthy

Saravanan Sundaramoorthy

Curious Learning Machine + Founder & CEO @AdmaticCloud @RoboticKitchen God is Great! More you give, more++ you get.

More from Medium

Fixing some problems starting Minikube with VirtualBox on Mac

Docker — User-defined Bridge Container Network

Theoretical of Docker

How to run Podman with Hashicorp Nomad on Ubuntu 20.04 LTS