Create a gist now

Instantly share code, notes, and snippets.

@gmacario /Dockerfile
Last active Feb 12, 2018

Embed
What would you like to do?
Can you run GUI apps in Docker?
# From http://stackoverflow.com/questions/16296753/can-you-run-gui-apps-in-a-docker
#
# Firefox over VNC
#
# VERSION 0.1
# DOCKER-VERSION 0.2
from ubuntu:12.04
# make sure the package repository is up to date
run echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
run apt-get update
# Install vnc, xvfb in order to create a 'fake' display and firefox
run apt-get install -y x11vnc xvfb firefox
run mkdir /.vnc
# Setup a password
run x11vnc -storepasswd 1234 ~/.vnc/passwd
# Autostart firefox (might not be the best way to do it, but it does the trick)
run bash -c 'echo "firefox" >> /.bashrc'
@krichter722

This comment has been minimized.

Show comment
Hide comment
@krichter722

krichter722 Nov 21, 2017

Running the above commands fails due to

> docker run -p 5900 creack/firefox-vnc x11vnc -forever -usepw -create
Enter VNC password: stty: standard input: Inappropriate ioctl for device
fgets: No such file or directory
stty: standard input: Inappropriate ioctl for device
x11vnc -usepw: could not find a password to use.

on Ubuntu 17.10.

Running the above commands fails due to

> docker run -p 5900 creack/firefox-vnc x11vnc -forever -usepw -create
Enter VNC password: stty: standard input: Inappropriate ioctl for device
fgets: No such file or directory
stty: standard input: Inappropriate ioctl for device
x11vnc -usepw: could not find a password to use.

on Ubuntu 17.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment