Skip to content
Snippets Groups Projects
Commit 1c2be72f authored by jfuser's avatar jfuser
Browse files

add a Dockerfile to build image

parent 14e60a97
Branches master
No related tags found
No related merge requests found
from debian:stable
LABEL maintainer "Jean-Francois Rey <jean-francois.rey@inra.fr>"
RUN apt-get update \
&& apt-get install -y jags g++ pkg-config git autotools-dev autoconf libtool make
RUN git clone https://gitlab.paca.inra.fr/jfrey/jags-module.git
RUN cd jags-module/mecastat \
&& autoreconf -ifv; exit 0
RUN cd jags-module/mecastat \
&& ./configure \
&& make \
&& make install
RUN apt-get remove g++ git pkg-config autotools autoconf libtool make --purge -y \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /tmp/downloaded_packages/ /tmp/*.rds \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -ms /bin/bash jags
RUN cd /jags-module/ && cp -r tests/* /home/jags/ \
&& rm -rf /jags-module
VOLUME /home/jags/
ENV LD_LIBRARY_PATH=/usr/local/lib/JAGS/modules-4/:$LD_LIBRARY_PATH
WORKDIR /home/jags/
USER jags
CMD ["/usr/bin/jags","script.jags"]
......@@ -10,17 +10,26 @@ It mainly allow to call a shell script from JAGS.
## Install from binary
* [Windows](binary/Windows/)
* [Linux](binary/Linux)
* [Windows](binary/Windows/) | use artifact from CI pipeline
## Install from source
* [Windows INSTALL](mecastat/README.WIN.md)
* [Linux / MACOS INSTALL](mecastat/README.md)
# Use docker image
```
# run a demo from test directory
docker run gitlab.paca.inra.fr:4567/jfrey/jags-module
# to run your own script contain in /my/own/path/
# with a jags script call script.jags
docker run -v /my/own/path:/home/jags gitlab.paca.inra.fr:4567/jfrey/jags-module
```
## How to compile (Developper mode)
> You need to install package "autotools", "autoconf", "automake", "libtool-bin", "pkgconfig", "g++".
> You need to install package "autotools", "autoconf", "automake", "libtool-bin", "pkgconfig", "g++", "make".
```shell
cd mecastat
......
File deleted
File deleted
......@@ -38,3 +38,10 @@ set PATH=C:\JAGS\JAGS-4.2.0\x64\bin\;%PATH%
jags-terminal.exe script.jags
```
## Using Docker
```
docker run gitlab.paca.inra.fr:4567/jfrey/jags-module
# to change working directory with your script (the jags script name is script.jags)
docker run -v /my/own/path:/home/jags gitlab.paca.inra.fr:4567/jfrey/jags-module
```
......@@ -6,7 +6,7 @@
# -> nbofrow nbofcolumns nbofmatrix data...
# -> data order : matrix1 first_columns_values second_columns_values matrix2 ...
pwd > iamhere.txt
#pwd > iamhere.txt
if [ $# -lt 2 ]; then
echo "ERROR in number of runmyscript.sh parameters !"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment