diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 00000000..fdf7e823 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,37 @@ +# freeseer - vga/presentation capture software +# +# Copyright (C) 2014 Free and Open Source Software Learning Centre +# http://fosslc.org +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# For support, questions, suggestions or any other inquiries, visit: +# http://wiki.github.com/Freeseer/freeseer/ + +FROM ubuntu:12.04 + +RUN apt-get update && apt-get upgrade -y +RUN apt-get install -y openssh-server pwgen +RUN apt-get install -y gstreamer-tools gstreamer0.10-plugins-good +RUN apt-get install -y sqlite libqt4-sql-sqlite +RUN apt-get install -y python-pip python-gst0.10 pyqt4-dev-tools python-qt4-sql python-feedparser python-httplib2 python-oauth python-simplejson +RUN pip install yapsy + +ADD scripts /scripts +RUN chmod +x /scripts/*.sh + +EXPOSE 22 + +CMD /scripts/start-sshd.sh + diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 00000000..4dd77368 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,28 @@ +Build +===== +To build the Freeseer docker image run the following command: + +
sudo docker build -rm -t freeseer .
+ + +Run +=== +To run the Freeseer docker image run the following command: + +
+sudo docker run -rm -p 3000:22 -i -t -v /home/username/git/freeseer/src:/freeseer freeseer
+
+OR
+
+sudo docker run -rm -p 3000:22 -i -t -privileged -v /dev/video0:/dev/video0 -v /dev/bus/usb:/dev/bus/usb -v /home/zxiiro/git/freeseer/src:/freeseer freeseer
+
+ +This will port forward the SSH port to your local port 3000 allowing you to connect to the docker image. +Use ssh -X root@localhost -p 3000 to connect. + +The paramenter -v source:destination will mount a local directory inside the docker image. You should use this +to mount your clone of your Freeseer repo inside the image. This will allow you to use your code from inside the image. + +If you need you mount a USB webcam adding the paramenters -privileged -v /dev/video0:/dev/video0 -v /dev/bus/usb:/dev/bus/usb +will allow you to see your USB webcam from inside the docker container. + diff --git a/docker/scripts/start-sshd.sh b/docker/scripts/start-sshd.sh new file mode 100644 index 00000000..aca354b1 --- /dev/null +++ b/docker/scripts/start-sshd.sh @@ -0,0 +1,40 @@ +# freeseer - vga/presentation capture software +# +# Copyright (C) 2014 Free and Open Source Software Learning Centre +# http://fosslc.org +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# For support, questions, suggestions or any other inquiries, visit: +# http://wiki.github.com/Freeseer/freeseer/ + +echo "Generating Root Password..." +PASS=$(pwgen -s 12 1) + +printf "$PASS\n$PASS" | passwd > /dev/null 2>&1 + +echo "---" +echo "SSH Server configured" +echo "---" +echo "Your randomly generated root password is $PASS" +echo "" +echo "To connect to the dev system run the following command:" +echo " ssh -X root@server -p " +echo "" +echo "Where is the port forwarded on your host." +echo "" + +echo "Starting SSHD..." +mkdir /var/run/sshd +exec /usr/sbin/sshd -D