Commit d1729281 authored by Alexandre Beelen's avatar Alexandre Beelen

Initial commit

parents
FROM debian:stretch
ARG release
ENV release=${release}
RUN apt-get -y update && apt-get install -y libx11-6 libpng16-16 libfftw3-3 libcfitsio5 libforms2 python python-numpy python3 python3 libgtk2.0 curl
RUN echo 'export GAG_ROOT_DIR=/gildas-exe-$release' >> /etc/bash.bashrc && echo 'export GAG_EXEC_SYSTEM=x86_64-debian9-gfortran' >> /etc/bash.bashrc && echo 'source $GAG_ROOT_DIR/etc/bash_profile' >> /etc/bash.bashrc
COPY gildas-exe-$release.tar.gz /
RUN tar xvzf gildas-exe-$release.tar.gz
FROM debian:stretch
ARG release
ENV release=${release}
RUN apt-get -y update && apt-get install -y libx11-dev libpng-dev libfftw3-dev libcfitsio-dev libforms-dev python-dev python-numpy python3-dev python3-numpy libgtk2.0-dev gfortran curl
RUN curl http://www.iram.fr/~gildas/dist/gildas-src-$release.tar.gz | tar xz
RUN bash -c "cd gildas-src-$release && GAG_SEARCH_PATH=/usr/lib/x86_64-linux-gnu source admin/gildas-env.sh && make && make install"
RUN echo 'export GAG_ROOT_DIR=/gildas-exe-$release' >> /etc/bash.bashrc && echo 'export GAG_EXEC_SYSTEM=x86_64-debian9-gfortran' >> /etc/bash.bashrc && echo 'source $GAG_ROOT_DIR/etc/bash_profile' >> /etc/bash.bashrc
RUN rm -Rf gildas-src-$release
RUN cd gildas-exe-$release && curl http://www.iram.fr/~gildas/dist/gildas-doc-$release.tar.gz | tar xz
Build
=====
Build the developpement image :
```bash
export release=mar18c
docker build -f Dockerfile.dev . --build-arg release=$release
```
tag it
```bash
docker tag $release abeelen/gildas:build
```
and make a tar from the files
```
docker run -it -u $(id -u) \
-v "/home/$USER:/home/$USER" \
abeelen/gildas:build tar cvzf $PWD/gildas-exe-$release.tar.gz /gildas-exe-$release
```
Build the execution image :
```bash
docker build -f Dockerfile . --build-arg release=$release
```
Finally tag this one
```bash
docker tag $release abeelen/gildas:$release
```
Usage
=====
To launch gildas, simply launch :
```bash
docker run -it --hostname "gildas" -u $(id -u) \
-e DISPLAY=${DISPLAY} -e HOME=${HOME} -e USER=${USER} \
-v "/etc/passwd:/etc/passwd:ro" \
-v "/home/$USER:/home/$USER" \
-v "/tmp/.X11-unix:/tmp/.X11-unix" \
abeelen/gildas:feb17c /bin/bash
```
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment