From 082bf445c83448f0cdbf782296015a889379dfdd Mon Sep 17 00:00:00 2001 From: Enrico Bocchi Date: Tue, 6 Sep 2022 17:23:58 +0200 Subject: [PATCH 01/12] docker-revad-eos: Use eos-all:4.8.91 as base image --- Dockerfile.revad-eos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.revad-eos b/Dockerfile.revad-eos index f8ab28f311..fa568a0100 100644 --- a/Dockerfile.revad-eos +++ b/Dockerfile.revad-eos @@ -16,7 +16,7 @@ # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. -FROM gitlab-registry.cern.ch/dss/eos/eos-all:4.8.66 +FROM gitlab-registry.cern.ch/dss/eos/eos-all:4.8.91 RUN yum -y update && yum clean all From 02fe4e923ecd381a2fdbc423ad93020c71c6a763 Mon Sep 17 00:00:00 2001 From: Enrico Bocchi Date: Tue, 6 Sep 2022 17:24:24 +0200 Subject: [PATCH 02/12] docker-revad-eos: Don't you update --- Dockerfile.revad-eos | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile.revad-eos b/Dockerfile.revad-eos index fa568a0100..bd8b844196 100644 --- a/Dockerfile.revad-eos +++ b/Dockerfile.revad-eos @@ -18,8 +18,6 @@ FROM gitlab-registry.cern.ch/dss/eos/eos-all:4.8.91 -RUN yum -y update && yum clean all - RUN yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm RUN yum install -y make git gcc libc-dev bash epel-release golang && \ yum clean all && \ From 5bf62a709b15cbb2dfd9228a6e8655958e4d344f Mon Sep 17 00:00:00 2001 From: Enrico Bocchi Date: Tue, 6 Sep 2022 17:25:59 +0200 Subject: [PATCH 03/12] docker-revad-eos: Sort and split install packages --- Dockerfile.revad-eos | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile.revad-eos b/Dockerfile.revad-eos index bd8b844196..4e9da9069a 100644 --- a/Dockerfile.revad-eos +++ b/Dockerfile.revad-eos @@ -19,7 +19,14 @@ FROM gitlab-registry.cern.ch/dss/eos/eos-all:4.8.91 RUN yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm -RUN yum install -y make git gcc libc-dev bash epel-release golang && \ +RUN yum install -y \ + bash \ + epel-release \ + git \ + gcc \ + golang \ + libc-dev \ + make && \ yum clean all && \ rm -rf /var/cache/yum From e2ee63789e8a9fcac78d41a8c89337d5a76536d2 Mon Sep 17 00:00:00 2001 From: Enrico Bocchi Date: Tue, 6 Sep 2022 17:28:11 +0200 Subject: [PATCH 04/12] docker-revad-eos: Small refeactor for readability --- Dockerfile.revad-eos | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile.revad-eos b/Dockerfile.revad-eos index 4e9da9069a..0f4ef0beec 100644 --- a/Dockerfile.revad-eos +++ b/Dockerfile.revad-eos @@ -35,12 +35,13 @@ ENV GOPATH /go WORKDIR /go/src/github/cs3org/reva COPY . . -RUN make build-revad-docker && cp /go/src/github/cs3org/reva/cmd/revad/revad /usr/bin/revad +RUN make build-revad-docker && \ + cp /go/src/github/cs3org/reva/cmd/revad/revad /usr/bin/revad && \ + chmod +x /usr/bin/revad -RUN mkdir -p /etc/revad/ && echo "" > /etc/revad/revad.toml +RUN mkdir -p /etc/revad/ && \ + touch /etc/revad/revad.toml RUN mkdir -p /usr/local/bin -RUN chmod +x /usr/bin/revad - ENTRYPOINT [ "/usr/bin/revad" ] CMD [ "-c", "/etc/revad/revad.toml", "-p", "/var/run/revad.pid" ] From 9f653fc681517978756f9db270c0c7eee11d48e3 Mon Sep 17 00:00:00 2001 From: Enrico Bocchi Date: Tue, 6 Sep 2022 18:26:42 +0200 Subject: [PATCH 05/12] docker-revad-eos: Build revad binary on eos-all image (due to missing ld-musl-x86_64.so.1) --- Dockerfile.revad-eos | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/Dockerfile.revad-eos b/Dockerfile.revad-eos index 0f4ef0beec..2c9bebd469 100644 --- a/Dockerfile.revad-eos +++ b/Dockerfile.revad-eos @@ -16,32 +16,28 @@ # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. -FROM gitlab-registry.cern.ch/dss/eos/eos-all:4.8.91 +FROM gitlab-registry.cern.ch/dss/eos/eos-all:4.8.91 as builder -RUN yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm -RUN yum install -y \ - bash \ - epel-release \ - git \ +RUN yum -y install \ gcc \ + git \ golang \ - libc-dev \ make && \ yum clean all && \ rm -rf /var/cache/yum ENV PATH /go/bin:/usr/local/go/bin:$PATH ENV GOPATH /go - WORKDIR /go/src/github/cs3org/reva COPY . . -RUN make build-revad-docker && \ - cp /go/src/github/cs3org/reva/cmd/revad/revad /usr/bin/revad && \ - chmod +x /usr/bin/revad +RUN make build-revad-docker + +FROM gitlab-registry.cern.ch/dss/eos/eos-all:4.8.91 +COPY --from=builder /go/src/github/cs3org/reva/cmd/revad/revad /usr/bin/revad +RUN chmod +x /usr/bin/revad RUN mkdir -p /etc/revad/ && \ touch /etc/revad/revad.toml -RUN mkdir -p /usr/local/bin ENTRYPOINT [ "/usr/bin/revad" ] CMD [ "-c", "/etc/revad/revad.toml", "-p", "/var/run/revad.pid" ] From 7c90ef222c1a7708f24236e4e83130408b6ad6d9 Mon Sep 17 00:00:00 2001 From: Enrico Bocchi Date: Wed, 7 Sep 2022 08:38:21 +0200 Subject: [PATCH 06/12] docker-revad-eos: Add changelog --- changelog/unreleased/dockerfile.revad-eos.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 changelog/unreleased/dockerfile.revad-eos.md diff --git a/changelog/unreleased/dockerfile.revad-eos.md b/changelog/unreleased/dockerfile.revad-eos.md new file mode 100644 index 0000000000..42c4cba64c --- /dev/null +++ b/changelog/unreleased/dockerfile.revad-eos.md @@ -0,0 +1,10 @@ +Improvement: Bring back multi-stage build to save on image size + +* Use EOS 4.8.91 as base image +* Bring back multi-stage build +* Build revad on the eos 4.8.91 image due to missing dependency (`ld-musl-x86_64.so.1`, typical of alpine) +* Copy the resulting revad from the builder container + +Resulting image size (unpacked on disk) is 2.59GB +* eos-all:4.8.91 is 2.47GB +* existing revad:latest-eos is 6.18GB From 5f9c9337d456a643c1c3a23529ab4bf8ba8842e8 Mon Sep 17 00:00:00 2001 From: Jimil Desai <47107987+jimil749@users.noreply.github.com> Date: Fri, 18 Nov 2022 10:09:14 +0100 Subject: [PATCH 07/12] Update changelog/unreleased/dockerfile.revad-eos.md Co-authored-by: Samuel Alfageme --- changelog/unreleased/dockerfile.revad-eos.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/changelog/unreleased/dockerfile.revad-eos.md b/changelog/unreleased/dockerfile.revad-eos.md index 42c4cba64c..24ac9e73d5 100644 --- a/changelog/unreleased/dockerfile.revad-eos.md +++ b/changelog/unreleased/dockerfile.revad-eos.md @@ -8,3 +8,5 @@ Improvement: Bring back multi-stage build to save on image size Resulting image size (unpacked on disk) is 2.59GB * eos-all:4.8.91 is 2.47GB * existing revad:latest-eos is 6.18GB + +https://github.com/cs3org/reva/pull/3197 From 61f6e031ba200ca5ca473d83eaa67533e04f034e Mon Sep 17 00:00:00 2001 From: Jimil Desai <47107987+jimil749@users.noreply.github.com> Date: Fri, 18 Nov 2022 13:51:57 +0100 Subject: [PATCH 08/12] Update dockerfile.revad-eos.md --- changelog/unreleased/dockerfile.revad-eos.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/unreleased/dockerfile.revad-eos.md b/changelog/unreleased/dockerfile.revad-eos.md index 24ac9e73d5..b68cddf751 100644 --- a/changelog/unreleased/dockerfile.revad-eos.md +++ b/changelog/unreleased/dockerfile.revad-eos.md @@ -1,4 +1,4 @@ -Improvement: Bring back multi-stage build to save on image size +Enhancement: Bring back multi-stage build to save on image size * Use EOS 4.8.91 as base image * Bring back multi-stage build From 9755c979ba37add03b2151a6f0f3f44f6fe88ab4 Mon Sep 17 00:00:00 2001 From: Enrico Bocchi Date: Fri, 2 Dec 2022 14:48:26 +0100 Subject: [PATCH 09/12] docker-revad-eos: Fix linter --- changelog/unreleased/dockerfile.revad-eos.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/changelog/unreleased/dockerfile.revad-eos.md b/changelog/unreleased/dockerfile.revad-eos.md index b68cddf751..1aac8bd5a9 100644 --- a/changelog/unreleased/dockerfile.revad-eos.md +++ b/changelog/unreleased/dockerfile.revad-eos.md @@ -1,12 +1,12 @@ Enhancement: Bring back multi-stage build to save on image size -* Use EOS 4.8.91 as base image -* Bring back multi-stage build -* Build revad on the eos 4.8.91 image due to missing dependency (`ld-musl-x86_64.so.1`, typical of alpine) -* Copy the resulting revad from the builder container + * Use EOS 4.8.91 as base image + * Bring back multi-stage build + * Build revad on the eos 4.8.91 image due to missing dependency (`ld-musl-x86_64.so.1`, typical of alpine) + * Copy the resulting revad from the builder container Resulting image size (unpacked on disk) is 2.59GB -* eos-all:4.8.91 is 2.47GB -* existing revad:latest-eos is 6.18GB + * eos-all:4.8.91 is 2.47GB + * existing revad:latest-eos is 6.18GB https://github.com/cs3org/reva/pull/3197 From bca1ee04bfaa399b333883665c5d0167bb1c05f4 Mon Sep 17 00:00:00 2001 From: Enrico Bocchi Date: Fri, 2 Dec 2022 14:51:20 +0100 Subject: [PATCH 10/12] docker-revad-eos: Use eos-fusex image --- Dockerfile.revad-eos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.revad-eos b/Dockerfile.revad-eos index fbe1d2ae02..fe8171c82d 100644 --- a/Dockerfile.revad-eos +++ b/Dockerfile.revad-eos @@ -16,7 +16,7 @@ # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. -FROM gitlab-registry.cern.ch/dss/eos/eos-all:4.8.91 as builder +FROM gitlab-registry.cern.ch/dss/eos/eos-fusex:4.8.91 as builder RUN yum -y install \ gcc \ From 259039cfda655d750e53373d22bcc6cfeca87d7a Mon Sep 17 00:00:00 2001 From: Enrico Bocchi Date: Fri, 2 Dec 2022 14:53:03 +0100 Subject: [PATCH 11/12] docker-revad-eos: Fix linter (again) --- changelog/unreleased/dockerfile.revad-eos.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/changelog/unreleased/dockerfile.revad-eos.md b/changelog/unreleased/dockerfile.revad-eos.md index 1aac8bd5a9..bbe797250d 100644 --- a/changelog/unreleased/dockerfile.revad-eos.md +++ b/changelog/unreleased/dockerfile.revad-eos.md @@ -1,12 +1,12 @@ Enhancement: Bring back multi-stage build to save on image size - * Use EOS 4.8.91 as base image - * Bring back multi-stage build - * Build revad on the eos 4.8.91 image due to missing dependency (`ld-musl-x86_64.so.1`, typical of alpine) - * Copy the resulting revad from the builder container + - Use EOS 4.8.91 as base image + - Bring back multi-stage build + - Build revad on the eos 4.8.91 image due to missing dependency (`ld-musl-x86_64.so.1`, typical of alpine) + - Copy the resulting revad from the builder container Resulting image size (unpacked on disk) is 2.59GB - * eos-all:4.8.91 is 2.47GB - * existing revad:latest-eos is 6.18GB + - eos-all:4.8.91 is 2.47GB + - existing revad:latest-eos is 6.18GB https://github.com/cs3org/reva/pull/3197 From 97139b0f7d003e6c5bac632aca431d1bee24638e Mon Sep 17 00:00:00 2001 From: Enrico Bocchi Date: Fri, 2 Dec 2022 15:02:02 +0100 Subject: [PATCH 12/12] docker-revad-eos: Fix linter (againx2) --- changelog/unreleased/dockerfile.revad-eos.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/changelog/unreleased/dockerfile.revad-eos.md b/changelog/unreleased/dockerfile.revad-eos.md index bbe797250d..531adaf472 100644 --- a/changelog/unreleased/dockerfile.revad-eos.md +++ b/changelog/unreleased/dockerfile.revad-eos.md @@ -1,12 +1,11 @@ Enhancement: Bring back multi-stage build to save on image size - - - Use EOS 4.8.91 as base image - - Bring back multi-stage build - - Build revad on the eos 4.8.91 image due to missing dependency (`ld-musl-x86_64.so.1`, typical of alpine) - - Copy the resulting revad from the builder container +- Use EOS 4.8.91 as base image +- Bring back multi-stage build +- Build revad on the eos 4.8.91 image due to missing dependency (`ld-musl-x86_64.so.1`, typical of alpine) +- Copy the resulting revad from the builder container Resulting image size (unpacked on disk) is 2.59GB - - eos-all:4.8.91 is 2.47GB - - existing revad:latest-eos is 6.18GB +- eos-all:4.8.91 is 2.47GB +- existing revad:latest-eos is 6.18GB https://github.com/cs3org/reva/pull/3197