From b4e08305bea81be91623a8b5643b1d5d4b3cecb1 Mon Sep 17 00:00:00 2001 From: Ladislav Gazo Date: Mon, 16 Mar 2015 21:51:53 +0100 Subject: [PATCH] created image for WireFrameSketcher, #10 --- bin/mug-wireframesketcher | 31 +++++++++++++++++++++++++ docker/wireframesketcher/Dockerfile | 35 +++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100755 bin/mug-wireframesketcher create mode 100644 docker/wireframesketcher/Dockerfile diff --git a/bin/mug-wireframesketcher b/bin/mug-wireframesketcher new file mode 100755 index 0000000..5fe839c --- /dev/null +++ b/bin/mug-wireframesketcher @@ -0,0 +1,31 @@ +#!/bin/bash + +workdir=$(dirname $0) + +. $workdir/functions.sh + +resolve_mugrc + +if [ ! -n "$development_dir" ]; then + development_dir="$HOME/development" +fi + +volumes="$volumes -v $development_dir:/home/developer/development" + +echo "[IDE] Development dir = $development_dir" + +sudo xhost + + +docker ps -a|grep mugwireframesketcher + +if [ "$?" -eq 0 ]; then + docker start mugwireframesketcher +else + docker run -d --name mugwireframesketcher \ + -e DISPLAY=$DISPLAY \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -v `pwd`:/workspace \ + $volumes \ + -t seges/mug-wireframesketcher +fi + diff --git a/docker/wireframesketcher/Dockerfile b/docker/wireframesketcher/Dockerfile new file mode 100644 index 0000000..ffeca9e --- /dev/null +++ b/docker/wireframesketcher/Dockerfile @@ -0,0 +1,35 @@ +FROM ubuntu:14.04 +MAINTAINER Ladislav Gazo + +RUN sed 's/main$/main universe/' -i /etc/apt/sources.list && \ + apt-get update && apt-get install -y software-properties-common && \ + add-apt-repository ppa:webupd8team/java -y && \ + apt-get update && \ + echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \ + apt-get install -y oracle-java8-installer libxext-dev libxrender-dev libxtst-dev && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* && \ + rm -rf /tmp/* + +# Install libgtk as a separate step so that we can share the layer above with +# the netbeans image +RUN apt-get update && apt-get install -y libgtk2.0-0 libcanberra-gtk-module + +RUN cd /opt && wget http://wireframesketcher.com/downloads/WireframeSketcher-latest_amd64.deb + +RUN apt-get install -y libwebkitgtk-1.0.0 +RUN cd /opt && dpkg -i WireframeSketcher-latest_amd64.deb + + +RUN mkdir -p /home/developer && \ + echo "developer:x:1000:1000:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \ + echo "developer:x:1000:" >> /etc/group && \ + echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \ + chmod 0440 /etc/sudoers.d/developer && \ + chown developer:developer -R /home/developer && \ + chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo + +USER developer +ENV HOME /home/developer +WORKDIR /home/developer +CMD /opt/WireframeSketcher/WireframeSketcher