Skip to content

Commit

Permalink
Merge pull request #20 from xgaia/chore/upgrade-to-7-2-14
Browse files Browse the repository at this point in the history
Upgrade to 7.2.14
  • Loading branch information
mboudet authored Nov 22, 2024
2 parents 2f479fd + c180da9 commit 3587be2
Showing 1 changed file with 10 additions and 21 deletions.
31 changes: 10 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
# Compile s3fs in a separate image
FROM alpine:3.17 AS s3fs-builder
RUN apk add --update fuse fuse-dev automake gcc make libcurl curl-dev libxml2 libxml2-dev \
openssl openssl-dev autoconf g++
RUN wget https://github.com/s3fs-fuse/s3fs-fuse/archive/refs/tags/v1.91.zip && \
unzip v1.91.zip
WORKDIR s3fs-fuse-1.91
RUN ./autogen.sh && ./configure && make && make install

# Compile virtuoso in a separate image
FROM alpine:3.17 AS builder
MAINTAINER Xavier Garnier '[email protected]'
FROM alpine:3.20 AS builder

# Environment variables
ENV VIRTUOSO_GIT_URL https://github.com/openlink/virtuoso-opensource.git
ENV VIRTUOSO_DIR /virtuoso-opensource
ENV VIRTUOSO_GIT_VERSION 7.2.9
ENV VIRTUOSO_GIT_URL=https://github.com/openlink/virtuoso-opensource.git
ENV VIRTUOSO_DIR=/virtuoso-opensource
ENV VIRTUOSO_GIT_VERSION=7.2.14

COPY patch.diff /patch.diff

# Install prerequisites
RUN apk add --update git automake autoconf automake libtool bison flex gawk gperf openssl \
g++ openssl-dev make patch xz-dev bzip2-dev
g++ openssl-dev make patch xz-dev bzip2-dev python3
# Download sources
RUN git clone -b v${VIRTUOSO_GIT_VERSION} --single-branch --depth=1 ${VIRTUOSO_GIT_URL} ${VIRTUOSO_DIR}
WORKDIR ${VIRTUOSO_DIR}
Expand All @@ -35,12 +25,11 @@ RUN make -j $(grep -c '^processor' /proc/cpuinfo)
RUN make -j $(grep -c '^processor' /proc/cpuinfo) install

# Final image
FROM alpine:3.17
ENV PATH /usr/local/virtuoso-opensource/bin/:$PATH
COPY --from=s3fs-builder /usr/local/bin/s3fs /usr/local/bin/s3fs
FROM alpine:3.20
ENV PATH=/usr/local/virtuoso-opensource/bin/:/root/.local/bin:$PATH

RUN apk add --no-cache --update openssl py-pip fuse libcurl libxml2 && \
pip install crudini && \
RUN apk add --no-cache --update openssl s3fs-fuse fuse libcurl libxml2 pipx && \
pipx install crudini && \
mkdir -p /usr/local/virtuoso-opensource/var/lib/virtuoso/db && \
ln -s /usr/local/virtuoso-opensource/var/lib/virtuoso/db /data

Expand All @@ -50,4 +39,4 @@ COPY virtuoso.ini dump_nquads_procedure.sql dump_one_graph_procedure.sql clean-l
WORKDIR /data
EXPOSE 8890 1111

CMD sh /virtuoso/virtuoso.sh
CMD ["/virtuoso/virtuoso.sh"]

0 comments on commit 3587be2

Please sign in to comment.