From 552e3c3eef40f61f3508c18df1213f162abc753e Mon Sep 17 00:00:00 2001 From: xgaia Date: Fri, 22 Nov 2024 11:25:53 +0100 Subject: [PATCH 1/8] chore: upgrade virtuoso to 7.2.14 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9dbe4cb..ae8f189 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ MAINTAINER Xavier Garnier 'xavier.garnier@irisa.fr' # 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_VERSION 7.2.14 COPY patch.diff /patch.diff From a37690358489f7c39335cbebe56f83b446ec956c Mon Sep 17 00:00:00 2001 From: xgaia Date: Fri, 22 Nov 2024 11:27:55 +0100 Subject: [PATCH 2/8] chore: upgrade alpine to 3.20 --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index ae8f189..7e49150 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Compile s3fs in a separate image -FROM alpine:3.17 AS s3fs-builder +FROM alpine:3.20 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 && \ @@ -8,7 +8,7 @@ WORKDIR s3fs-fuse-1.91 RUN ./autogen.sh && ./configure && make && make install # Compile virtuoso in a separate image -FROM alpine:3.17 AS builder +FROM alpine:3.20 AS builder MAINTAINER Xavier Garnier 'xavier.garnier@irisa.fr' # Environment variables @@ -35,7 +35,7 @@ RUN make -j $(grep -c '^processor' /proc/cpuinfo) RUN make -j $(grep -c '^processor' /proc/cpuinfo) install # Final image -FROM alpine:3.17 +FROM alpine:3.20 ENV PATH /usr/local/virtuoso-opensource/bin/:$PATH COPY --from=s3fs-builder /usr/local/bin/s3fs /usr/local/bin/s3fs From 8e0655c9418246fb18ba4a993bc822093f916789 Mon Sep 17 00:00:00 2001 From: xgaia Date: Fri, 22 Nov 2024 11:28:04 +0100 Subject: [PATCH 3/8] refactor: remove deprecated MAINTAINER entry --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7e49150..45ec18d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,6 @@ RUN ./autogen.sh && ./configure && make && make install # Compile virtuoso in a separate image FROM alpine:3.20 AS builder -MAINTAINER Xavier Garnier 'xavier.garnier@irisa.fr' # Environment variables ENV VIRTUOSO_GIT_URL https://github.com/openlink/virtuoso-opensource.git From 4f8cfdd470cc5389f29e38c394890dbc359c6463 Mon Sep 17 00:00:00 2001 From: xgaia Date: Fri, 22 Nov 2024 15:06:34 +0100 Subject: [PATCH 4/8] refactor: replace `ENV key value` with `ENV key=value` syntaxe --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 45ec18d..66b3e7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,9 +11,9 @@ RUN ./autogen.sh && ./configure && make && make install 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.14 +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 @@ -35,7 +35,7 @@ RUN make -j $(grep -c '^processor' /proc/cpuinfo) install # Final image FROM alpine:3.20 -ENV PATH /usr/local/virtuoso-opensource/bin/:$PATH +ENV PATH=/usr/local/virtuoso-opensource/bin/:$PATH COPY --from=s3fs-builder /usr/local/bin/s3fs /usr/local/bin/s3fs RUN apk add --no-cache --update openssl py-pip fuse libcurl libxml2 && \ From b1266c64d066c13c31c2d03c31a2e28427e02fd8 Mon Sep 17 00:00:00 2001 From: xgaia Date: Fri, 22 Nov 2024 15:07:50 +0100 Subject: [PATCH 5/8] refactor: use json syntaxe for CMD --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 66b3e7c..2de57cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,4 +49,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"] From ac30353db20a460d9806efc0b75c8e24bc819712 Mon Sep 17 00:00:00 2001 From: xgaia Date: Fri, 22 Nov 2024 15:08:21 +0100 Subject: [PATCH 6/8] feat: use s3fs from package manager since it have fixed --- Dockerfile | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2de57cd..a88883f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,3 @@ -# Compile s3fs in a separate image -FROM alpine:3.20 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.20 AS builder @@ -36,9 +27,8 @@ RUN make -j $(grep -c '^processor' /proc/cpuinfo) install # Final image FROM alpine:3.20 ENV PATH=/usr/local/virtuoso-opensource/bin/:$PATH -COPY --from=s3fs-builder /usr/local/bin/s3fs /usr/local/bin/s3fs -RUN apk add --no-cache --update openssl py-pip fuse libcurl libxml2 && \ +RUN apk add --no-cache --update openssl py-pip s3fs-fuse fuse libcurl libxml2 && \ pip install crudini && \ mkdir -p /usr/local/virtuoso-opensource/var/lib/virtuoso/db && \ ln -s /usr/local/virtuoso-opensource/var/lib/virtuoso/db /data From f95e0d9598a6852ccd11909d5e982cb36a5e6961 Mon Sep 17 00:00:00 2001 From: xgaia Date: Fri, 22 Nov 2024 15:11:25 +0100 Subject: [PATCH 7/8] refactor: use pipx instead of pip to install crudini --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a88883f..e43ff85 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,10 +26,10 @@ RUN make -j $(grep -c '^processor' /proc/cpuinfo) install # Final image FROM alpine:3.20 -ENV PATH=/usr/local/virtuoso-opensource/bin/:$PATH +ENV PATH=/usr/local/virtuoso-opensource/bin/:/root/.local/bin:$PATH -RUN apk add --no-cache --update openssl py-pip s3fs-fuse 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 From c180da9c482436863e31b6b9b5fcfc64f3c29b57 Mon Sep 17 00:00:00 2001 From: xgaia Date: Fri, 22 Nov 2024 15:11:46 +0100 Subject: [PATCH 8/8] fix: missing python3 in build image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e43ff85..d71ecf0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ 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}