Hi,
I've create a Dockerfile that allowed me to build a container with the
prototype_2016 UI for secushare in it. I've attached a patch generated
by running `git diff c0b7e49ad5f4fac8c3c64fc3e3cc3760e40cf044`. You can
also see the actual commits here https://github.com/lverns/secushare-ui
/tree/docker-wrapper (if you don't mind visiting GitHub).
You'll note that there is one RUN command that patches build-fluid.sh
and one that fetches down icons and puts them where the program expects
to find them. The fact that those are necessary indicates that there
are some issues in the normal build process that should probably be
addressed.
Cheers,
Laverne Schrock
P.S. Since the repo is AGPLv3 I'm obviously okay with this patch being
destributed under the terms of that license.
diff --git a/prototype_2016/Dockerfile b/prototype_2016/Dockerfile
new file mode 100644
index 0000000..49d2db0
--- /dev/null
+++ b/prototype_2016/Dockerfile
@@ -0,0 +1,25 @@
+FROM ubuntu:17.04
+
+RUN apt-get update
+RUN apt-get install -y git g++ cmake cargo qtchooser doxygen qml qml-module-qtquick-controls \
+ libqt5quickcontrols2-5 qtbase5-dev qtdeclarative5-dev libqt5svg5-dev \
+ qtquickcontrols2-5-dev extra-cmake-modules qml-module-qtquick-controls2 \
+ qml-module-qtquick-templates2
+
+#Tools for accessing the GUI (see the README file)
+RUN apt-get install -y xvfb x11vnc openbox
+
+# Fetch the secushare source
+RUN mkdir -p /opt/secushare
+RUN git clone --depth=1 git://gnunet.org/secushare.git /opt/secushare
+
+# Patch the build script to work on this architecture
+RUN cd /opt/secushare/prototype_2016 && sed -i 's#../install/lib64/qml/Fluid/#../install/lib/x86_64-linux-gnu/qml/Fluid#' build-fluid.sh
+
+# build the software
+RUN cd /opt/secushare/prototype_2016 && cargo build
+
+# fetch the icons and place them in a reachable location
+RUN cd /opt/secushare/prototype_2016/third_party/fluid/scripts && \
+ ./fetch_icons.sh && \
+ mv icons /opt/secushare/prototype_2016/target/debug/Fluid/Controls/icons
diff --git a/prototype_2016/README b/prototype_2016/README
index bc29143..476e932 100644
--- a/prototype_2016/README
+++ b/prototype_2016/README
@@ -43,3 +43,46 @@ Compilation is as simple as running
$ cargo build
from the project's root directory. The binaries will be in target/debug/.
+
+
+* Using the Dockerfile
+
+It can sometimes be a struggle to get all the neccesary
+dependencies to build a new piece of software. Since this project does not yet
+have packages for most Linux distros, we've made it possible to build and run
+the software in a Docker container.
+
+** Compatibility and requirements
+
+If you are using the Docker container, you won't need any of
+the prerequisites prerequisites listed above installed on your machine.
+
+The container has been tested with:
+ - Docker 17.05.0-ce on Fedora 24
+ - Docker 17.03.2-ce on NixOS 17.03
+
+You'll also need a VNC Viewer. I've found TigerVNC to work well.
+
+** Building and Running
+- Build the container and give it name (takes a long time)
+ $ docker build -t secushare-ui .
+- Get a shell into the container
+ $ docker run -it secushare-ui /bin/bash
+- You'll now have access to a shell running as root in the container.
+ Launch a graphical environment inside the container
+ # x11vnc -create
+- In a new shell on the host, get the container id of the container
+ # docker ps
+ CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+ 0fcd1635c0b1 secushare-ui "/bin/bash" 25 seconds ago Up 23 seconds friendly_morse
+- Use the container ID to find the IP address of the container
+ # docker inspect 0fcd1635c0b1
+- Now use your VNC viewer to make a connection to the IP address at port 5900
+- When the connection is established you should be presented with a small, white terminal
+ on a black background.
+ In that terminal, run:
+ $ openbox &
+- You will now have a simple window manager running, which can be useful if you want
+ to (e.g.) resize or move the application window.
+ Finally, execute the built software:
+ $ /opt/secushare/prototype_2016/target/debug/secushare
_______________________________________________
GNUnet-developers mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnunet-developers