Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN mkdir -p /usr/share/man/man1 && \
update-alternatives --set javaws /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/javaws && \
apt-get -y --force-yes autoremove && \
apt-get clean && \
rm -rf /var/lib/{apt,dpkg,cache,log} && \
rm -rf /var/lib/apt/lists/* && \
mkdir ~/.vnc && \
echo "exec jwm &" >> ~/.xinitrc && \
echo "firefox" >> ~/.xinitrc && \
Expand Down
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,39 @@ Docker image that runs an old Firefox web browser with an outdated Java plugin (

This image is built on Debian Wheezy, therefore the available browser is Iceweasel, the Debian-rebranded version of Firefox. The Java support is based on OpenJDK 6 and the IcedTea plugin.

> **WARNING:** this image is insecure by design. Java applets need the NPAPI plugin interface, which modern browsers dropped, so the whole stack (Debian 7, Iceweasel, Java 6) is years past its end of life and carries well over a thousand known vulnerabilities. Use it only to reach a trusted legacy interface, stop it when you're done, and never browse the Internet with it.

## How to use this image

This will start a container:

$ docker run -d --rm -p 5900:5900 --name firefox-java-vnc mablanco/firefox-java-vnc
$ docker run -d --rm -p 127.0.0.1:5900:5900 --name firefox-java-vnc mablanco/firefox-java-vnc

Now you can access Firefox with any VNC client opening localhost on standard port 5900.

The VNC server has no password, so the example publishes the port on `127.0.0.1` only. If you publish it on other interfaces (`-p 5900:5900`), anyone who can reach your machine gets the browser and whatever management interface it is logged into.

### Setting a VNC password

Any argument after the image name is passed to `x11vnc`. To require a password, add `-passwd` (this replaces the default arguments, so repeat `-geometry` if you need it):

$ docker run -d --rm -p 127.0.0.1:5900:5900 --name firefox-java-vnc mablanco/firefox-java-vnc -passwd <password> -geometry 1024x768

The password is visible in `docker inspect` and in the process list, so treat it as a guard against casual access, not as real protection.

### Setting the Geometry

By default the `-geometry` option is set to `1024x768`, if you want to override that you can add that as a command after container name:

$ docker run -d --rm -p 5900:5900 --name firefox-java-vnc mablanco/firefox-java-vnc -geometry 960x640
$ docker run -d --rm -p 127.0.0.1:5900:5900 --name firefox-java-vnc mablanco/firefox-java-vnc -geometry 960x640

> NOTE: According the the [documentation](https://github.com/LibVNC/x11vnc/blob/master/doc/OPTIONS.md) `-geometry` and `-scale` are the same option "-geometry WxH: Same as -scale WxH"

## Troubleshooting

If the container starts and then dies without notice, follow these steps to try to debug the problem:

1. Launch the container without the `--rm` argument: `docker run -p 5900:5900 --name firefox-java-vnc mablanco/firefox-java-vnc`
1. Launch the container without the `--rm` argument: `docker run -p 127.0.0.1:5900:5900 --name firefox-java-vnc mablanco/firefox-java-vnc`
2. When the container exists, run the command `docker ps -a | grep firefox-java-vnc` and check if the exit code is 139
3. Have a look at your kernel logs with `sudo dmesg` and look for a line like this one: `x11vnc[154000] vsyscall attempted with vsyscall=none...`

Expand Down
Loading