Skip to content

Commit

Permalink
created image for WireFrameSketcher, #10
Browse files Browse the repository at this point in the history
  • Loading branch information
lgazo committed Mar 16, 2015
1 parent 746433a commit b4e0830
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
31 changes: 31 additions & 0 deletions bin/mug-wireframesketcher
Original file line number Diff line number Diff line change
@@ -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

35 changes: 35 additions & 0 deletions docker/wireframesketcher/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM ubuntu:14.04
MAINTAINER Ladislav Gazo <gazo@seges.sk>

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

0 comments on commit b4e0830

Please sign in to comment.