Procházet zdrojové kódy

First public version

Rob Austein před 5 roky
revize
60eee0111d
6 změnil soubory, kde provedl 56 přidání a 0 odebrání
  1. 3 0
      .dockerignore
  2. 16 0
      Dockerfile
  3. 7 0
      Makefile
  4. 13 0
      README.md
  5. 5 0
      create.sh
  6. 12 0
      startup.sh

+ 3 - 0
.dockerignore

@@ -0,0 +1,3 @@
+create.sh
+Makefile
+README.md

+ 16 - 0
Dockerfile

@@ -0,0 +1,16 @@
+# At some point maybe add variables to control size of screen.
+
+FROM debian:stretch
+
+RUN apt-get --yes update && apt-get --yes install --no-install-recommends \
+    firefox-esr \
+    icewm \
+    tightvncserver \
+    xfonts-base \
+    xterm
+
+COPY startup.sh /
+
+CMD ["/startup.sh"]
+
+EXPOSE 5900

+ 7 - 0
Makefile

@@ -0,0 +1,7 @@
+all:
+	docker build --tag firefox-vnc .
+
+clean:
+	@true
+
+.PHONY: all clean

+ 13 - 0
README.md

@@ -0,0 +1,13 @@
+FireDock
+========
+
+Firefox running under Xvnc inside a Docker container, a demented tool
+to solve a demented problem.
+
+Occasionally one needs to run dangerous code in a web brower, eg, some
+dodgy Java app which is the only available interface to some critical
+resource.  Running this in one's normal web browser is a bad idea.
+
+So what one really wants here is a burner web browser.  Here you go.
+
+See `create.sh` for how one might run the image.

+ 5 - 0
create.sh

@@ -0,0 +1,5 @@
+#!/bin/sh -
+
+# Sample of how one might start up a container, season to taste.
+
+docker create -it --name firedock --publish 127.0.0.1:5900:5900 firedock

+ 12 - 0
startup.sh

@@ -0,0 +1,12 @@
+#!/bin/sh -
+
+export USER=root HOME=/root DISPLAY=:0 XAUTHORITY=$HOME/.Xauthority
+
+mkdir -p $HOME/.vnc
+echo '' | vncpasswd -f >$HOME/.vnc/passwd
+chmod -R go= $HOME/.vnc
+
+# -localhost
+vncserver $DISPLAY -geometry 1280x768 -depth 16 -nolisten tcp
+icewm
+vncserver -kill $DISPLAY