mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/cqpserver.git
synced 2024-12-26 11:24:19 +00:00
Update
This commit is contained in:
parent
926ded985a
commit
343e9157dc
@ -1,40 +1,35 @@
|
|||||||
FROM debian:10-slim
|
FROM debian:10-slim
|
||||||
|
|
||||||
|
|
||||||
LABEL maintainer="inf_sfb1288@lists.uni-bielefeld.de"
|
LABEL maintainer="inf_sfb1288@lists.uni-bielefeld.de"
|
||||||
|
|
||||||
|
|
||||||
ENV LANG=C.UTF-8
|
ENV LANG=C.UTF-8
|
||||||
ENV PLATFORM=linux-64
|
ENV PLATFORM=linux-64
|
||||||
ENV SITE=standard
|
ENV SITE=standard
|
||||||
|
|
||||||
|
|
||||||
EXPOSE 4877
|
EXPOSE 4877
|
||||||
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
subversion \
|
subversion
|
||||||
bison flex gcc make pkg-config libncurses5 libncurses5-dev libpcre3-dev libglib2.0-0 libglib2.0-dev libreadline7 libreadline-dev
|
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
|
|
||||||
|
|
||||||
# Installation: IMS Open Corpus Workbench
|
# Installation: IMS Open Corpus Workbench
|
||||||
RUN svn -q export http://svn.code.sf.net/p/cwb/code/cwb/trunk cwb \
|
RUN apt-get install -y --no-install-recommends \
|
||||||
|
autoconf bison flex gcc make pkg-config libc6-dev libncurses5 libncurses5-dev libpcre3-dev libglib2.0-0 libglib2.0-dev libreadline7 libreadline-dev \
|
||||||
|
&& svn co http://svn.code.sf.net/p/cwb/code/cwb/trunk cwb \
|
||||||
&& cd cwb \
|
&& cd cwb \
|
||||||
&& make clean \
|
&& make clean \
|
||||||
&& make depend \
|
&& make depend \
|
||||||
&& make all \
|
&& make all \
|
||||||
&& make install \
|
&& make install \
|
||||||
|
&& make realclean \
|
||||||
&& cd .. \
|
&& cd .. \
|
||||||
&& rm -r cwb
|
&& rm -r cwb
|
||||||
|
|
||||||
|
|
||||||
# Installation: Perl CWB package
|
# Installation: Perl CWB package
|
||||||
RUN echo "yes" | cpan HTML::Entities \
|
RUN yes | cpan HTML::Entities \
|
||||||
&& svn -q export http://svn.code.sf.net/p/cwb/code/perl/trunk/CWB perl-cwb \
|
&& svn co http://svn.code.sf.net/p/cwb/code/perl/trunk/CWB perl-cwb \
|
||||||
&& cd perl-cwb \
|
&& cd perl-cwb \
|
||||||
&& perl Makefile.PL \
|
&& perl Makefile.PL \
|
||||||
&& make \
|
&& make \
|
||||||
@ -43,8 +38,9 @@ RUN echo "yes" | cpan HTML::Entities \
|
|||||||
&& cd .. \
|
&& cd .. \
|
||||||
&& rm -r perl-cwb
|
&& rm -r perl-cwb
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
RUN rm -r /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY docker-entrypoint.sh /usr/local/bin/
|
COPY docker-entrypoint.sh /usr/local/bin/
|
||||||
|
|
||||||
|
|
||||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||||
|
@ -1,15 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
if [ "${1}" == "build-corpus" ]; then
|
||||||
CQPSERVER_HOST="${CQPSERVER_HOST:-*}"
|
|
||||||
CQPSERVER_PASSWORD="${CQPSERVER_PASSWORD:-}"
|
|
||||||
CQPSERVER_USER="${CQPSERVER_USER:-anonymous}"
|
|
||||||
|
|
||||||
echo "host ${CQPSERVER_HOST};" > /root/cqpserver.init
|
|
||||||
echo "user ${CQPSERVER_USER} \"${CQPSERVER_PASSWORD}\";" >> /root/cqpserver.init
|
|
||||||
|
|
||||||
cqpserver -I /root/cqpserver.init
|
|
||||||
elif [ $1 == "prepare" ]; then
|
|
||||||
# Input:
|
# Input:
|
||||||
# - Source file: "/root/files/corpus.vrt"
|
# - Source file: "/root/files/corpus.vrt"
|
||||||
# Output
|
# Output
|
||||||
@ -28,6 +19,15 @@ elif [ $1 == "prepare" ]; then
|
|||||||
-xsB
|
-xsB
|
||||||
cwb-make \
|
cwb-make \
|
||||||
-V CORPUS
|
-V CORPUS
|
||||||
|
elif [ "${1}" == "cqpserver" ]; then
|
||||||
|
CQPSERVER_HOST="${CQPSERVER_HOST:-*}"
|
||||||
|
CQPSERVER_PASSWORD="${CQPSERVER_PASSWORD:-}"
|
||||||
|
CQPSERVER_USER="${CQPSERVER_USER:-anonymous}"
|
||||||
|
|
||||||
|
echo "host ${CQPSERVER_HOST};" > cqpserver.init
|
||||||
|
echo "user ${CQPSERVER_USER} \"${CQPSERVER_PASSWORD}\";" >> cqpserver.init
|
||||||
|
|
||||||
|
cqpserver -I cqpserver.init "${@:2}"
|
||||||
else
|
else
|
||||||
echo "Unknown command"
|
echo "Usage: ${0} {build-corpus|cqpserver [OPTION]...}"
|
||||||
fi
|
fi
|
||||||
|
@ -2,6 +2,8 @@ version: '3'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
cqpserver:
|
cqpserver:
|
||||||
|
command:
|
||||||
|
- "cqpserver"
|
||||||
build: ./build/cqpserver
|
build: ./build/cqpserver
|
||||||
env_file: ./env_files/cqpserver.env
|
env_file: ./env_files/cqpserver.env
|
||||||
image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/cqpserver:latest
|
image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/cqpserver:latest
|
||||||
|
Loading…
Reference in New Issue
Block a user