From f9e14cbd78d96d9e86d5dfdf6cc477e6d793f001 Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Thu, 8 Apr 2021 13:18:58 +0200 Subject: [PATCH] Add debug docker container for jf-live-writer This container is meant to run and test the jf-live-writer locally without the need to install the PHDF5 library in your local environment. Follow the instructions in the README file. --- .dockerignore | 4 ++++ jf-live-writer/README.md | 10 ++++++++++ jf-live-writer/debug.Dockerfile | 10 ++++++++++ 3 files changed, 24 insertions(+) create mode 100644 .dockerignore create mode 100644 jf-live-writer/debug.Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..e98d44a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +cmake-build-*/ +docker/ +docs/ +scripts/ \ No newline at end of file diff --git a/jf-live-writer/README.md b/jf-live-writer/README.md index 3a92a90..27286b8 100644 --- a/jf-live-writer/README.md +++ b/jf-live-writer/README.md @@ -3,6 +3,16 @@ The jf-live-writer is packaged as a Docker container for development and testing. +# Using the docker container +The easiest way to build and test the jf-live-writer is to use the +provided docker container. You need to start it from the project **root**: + +```bash +docker build -f jf-live-writer/debug.Dockerfile -t jf-live-writer . +``` +(Running this command from the project root is mandatory as the entire project +folder needs to be part of the build context.) + ## Building In order to build this executable you need to specify the cmake variable ``` diff --git a/jf-live-writer/debug.Dockerfile b/jf-live-writer/debug.Dockerfile new file mode 100644 index 0000000..1a8c53f --- /dev/null +++ b/jf-live-writer/debug.Dockerfile @@ -0,0 +1,10 @@ +FROM paulscherrerinstitute/sf-daq_phdf5:1.0.0 + +COPY . /sf_daq_buffer/ + +RUN mkdir /sf_daq_buffer/build && \ + cd /sf_daq_buffer/build && \ + cmake3 -DBUILD_JF_LIVE_WRITER=ON .. && \ + make jf-live-writer + +WORKDIR /sf_daq_buffer/build