Skip to content

Commit

Permalink
OpenTREP is now reetrieved as released artifact rather than Git repos…
Browse files Browse the repository at this point in the history
…itory
  • Loading branch information
da115115 committed Sep 29, 2019
1 parent 594470f commit 7c50849
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ $ docker run -t opentrep/search-travel:centos7 "opentrep-search -q nce sfo"
```

# Contribute a custom Docker image
* Get the [latest OpenREP release](https://github.com/trep/opentrep/releases/latest):
```bash
$ trep_ver=$(curl -s https://api.github.com/repos/trep/opentrep/releases/latest | jq -r ".tarball_url" | sed -e 's/.*v\([0-9.]\{3\}\)/\1/g')
$ curl -L https://github.com/trep/opentrep/archive/v${trep_ver}.tar.gz -o opentrep-${trep_ver}.tar.gz
```

* Build the Docker image:
```bash
$ docker build -t opentrep/search-travel:centos7beta centos7
Expand Down
18 changes: 12 additions & 6 deletions centos7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ ENV container docker
ENV HOME /root
ENV TREP_DIR /var/www/webapps/opentrep/trep
ENV TREP_BUILD_DIR ${HOME}/trep/build
ENV TREP_VER 0.6.7
ENV XAPIAN_DB ${TREP_DIR}/traveldb
ENV SQLITE_DB ${TREP_DIR}/sqlite_travel.db

# House keeping
RUN yum clean all && \
yum -y update && \
yum -y install epel-release && \
yum -y install htop less file sudo rpmconf git bash-completion
yum -y install htop less file sudo rpmconf git bash-completion \
jq curl

# C++ development
RUN yum -y install gcc-c++ make cmake cmake3 \
Expand All @@ -34,12 +34,18 @@ RUN yum -y install python-devel python36-devel
RUN yum -y install doxygen ghostscript "tex(latex)"

# User environment
ADD bashrc $HOME/
RUN cat $HOME/bashrc >> $HOME/.bashrc && rm -f $HOME/bashrc
ADD bashrc ${HOME}/
RUN cat ${HOME}/bashrc >> ${HOME}/.bashrc && rm -f ${HOME}/bashrc

# Set up of the environment for OpenTREP
RUN git clone https://github.com/trep/opentrep.git ${HOME}/trep
RUN mkdir -p ${TREP_BUILD_DIR}
WORKDIR ${HOME}
RUN trep_ver=$(curl -s https://api.github.com/repos/trep/opentrep/releases/latest | \
jq -r ".tarball_url" | sed -e 's/.*v\([0-9.]\{3\}\)/\1/g') && \
curl -L https://github.com/trep/opentrep/archive/v${trep_ver}.tar.gz \
-o ${HOME}/opentrep-${trep_ver}.tar.gz && \
tar zxf opentrep-${trep_ver}.tar.gz && \
ln -s opentrep-${trep_ver} trep && \
mkdir -p ${TREP_BUILD_DIR}
WORKDIR ${TREP_BUILD_DIR}

# Launch the build
Expand Down

0 comments on commit 7c50849

Please sign in to comment.