Klett – Nusskacker 2 (school cdrom of my daughter)

Hi,

ok this time I share something I did to keep my spare time spare time,
these weeks school started again and my daughter arrived with a new book including a CD.

Long story short is it “nusskacker 2” from klett, which is some flash program to train math. In order to make it runable everywhere I build up a docker container. If you also would like to do so I share here “How to…”.

1) Dockerfile

FROM ubuntu:vivid
RUN mkdir -p /opt /opt/home
# cd.tgz is the tar czf of the cdrom
ADD cd.tgz /opt/nussknacker_2
RUN adduser --disabled-password --home /opt/home/klett klett
RUN chmod -R a+rx /opt/nussknacker_2
RUN dpkg --add-architecture i386 ; apt-get update ; apt-get install -y libc6:i386 libstdc++6:i386
RUN apt-get install -y libx11-6:i386 libxt6:i386 libgtk2.0-0:i386
RUN apt-get install -y libcurl3:i386 libsqlite3-0:i386 libidn11:i386 libxxf86vm1:i386 libssl0.9.8:i386 libnss3:i386
RUN apt-get install -y overlay-scrollbar-gtk2 gtk2-engines-murrine:i386 libcanberra-gtk-module:i386
USER klett
WORKDIR /opt/nussknacker_2/
ENTRYPOINT ./start

2) build command.

#!/bin/bash

BASE=”`dirname “$0″`”
[ “$BASE” = “.” ] && BASE=`pwd`

cd ${BASE}/nussknacker_2

docker build -t klett:nussknacker_2 –no-cache=false .

3) launch command for the container

#!/bin/bash

BASE=”`dirname “$0″`”
[ “$BASE” = “.” ] && BASE=`pwd`

xhost +si:localuser:`id -un`

docker run -t -i –rm=false \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v ~/.macromedia:/opt/home/klett/.macromedia \
-e DISPLAY \
klett:nussknacker_2

Hope this also works for you :).

Enjoy.

Advertisements
This entry was posted in build-script, container-launcher, Docker, Dockerfile, klett, linux, nussknacker 2, school, ubuntu. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s