From 8ce18a89273f89ee2cd27bb95869d6a3b60f9efa Mon Sep 17 00:00:00 2001 From: Samuel Alfageme Date: Tue, 15 Sep 2020 13:41:12 +0200 Subject: [PATCH 1/3] Dockerfile for revad-eos based on eos:c8_4.8.15 --- .dockerignore | 10 ++++++++++ Dockerfile.revad-eos | 28 ++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile.revad-eos diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..dedb85173a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,10 @@ +.github +.git +changelog +docs +examples +grpc-tests +tests +tools +vendor-bin +*.md diff --git a/Dockerfile.revad-eos b/Dockerfile.revad-eos new file mode 100644 index 0000000000..a3f540761e --- /dev/null +++ b/Dockerfile.revad-eos @@ -0,0 +1,28 @@ +# Copyright 2018-2021 CERN +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# In applying this license, CERN does not waive the privileges and immunities +# granted to it by virtue of its status as an Intergovernmental Organization +# or submit itself to any jurisdiction. +FROM golang:1.15 as builder + +WORKDIR /go/src/github/cs3org/reva +COPY . . +RUN make build-revad-docker && \ + cp /go/src/github/cs3org/reva/cmd/revad/revad /go/bin/revad + +FROM gitlab-registry.cern.ch/dss/eos:c8_4.8.15 +RUN mkdir -p /usr/local/bin +COPY --from=builder /go/bin/revad /go/bin/ +RUN chmod +x /go/bin/revad From b3ccb9bf027dddbd1ceeaf41858f45d0e308c16c Mon Sep 17 00:00:00 2001 From: Samuel Alfageme Sainz Date: Tue, 5 Jan 2021 12:42:29 +0100 Subject: [PATCH 2/3] Add publish step for cs3org/revad-eos and revert to plugins/docker ... for privileged execution. - Add changelog entry. --- .drone.yml | 32 ++++++++++++++++--- .../unreleased/revad-eos-docker-image.md | 6 ++++ 2 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 changelog/unreleased/revad-eos-docker-image.md diff --git a/.drone.yml b/.drone.yml index ea0f912a3b..2ec7168078 100644 --- a/.drone.yml +++ b/.drone.yml @@ -65,7 +65,7 @@ steps: - name: publish-docker-reva-latest pull: always - image: registry.cern.ch/docker.io/plugins/docker + image: plugins/docker settings: repo: cs3org/reva tags: latest @@ -77,7 +77,7 @@ steps: - name: publish-docker-revad-latest pull: always - image: registry.cern.ch/docker.io/plugins/docker + image: plugins/docker settings: repo: cs3org/revad tags: latest @@ -87,6 +87,18 @@ steps: password: from_secret: dockerhub_password +- name: publish-docker-revad-eos-latest + pull: always + image: plugins/docker + settings: + repo: cs3org/revad-eos + tags: latest + dockerfile: Dockerfile.revad-eos + username: + from_secret: dockerhub_username + password: + from_secret: dockerhub_password + --- kind: pipeline type: docker @@ -202,7 +214,7 @@ steps: - name: docker-reva-tag pull: always - image: registry.cern.ch/docker.io/plugins/docker + image: plugins/docker settings: repo: cs3org/reva tags: ${DRONE_TAG} @@ -214,7 +226,7 @@ steps: - name: docker-revad-tag pull: always - image: registry.cern.ch/docker.io/plugins/docker + image: plugins/docker settings: repo: cs3org/revad tags: ${DRONE_TAG} @@ -224,6 +236,18 @@ steps: password: from_secret: dockerhub_password +- name: docker-revad-eos-tag + pull: always + image: plugins/docker + settings: + repo: cs3org/revad-eos + tags: ${DRONE_TAG} + dockerfile: Dockerfile.revad-eos + username: + from_secret: dockerhub_username + password: + from_secret: dockerhub_password + --- kind: pipeline type: docker diff --git a/changelog/unreleased/revad-eos-docker-image.md b/changelog/unreleased/revad-eos-docker-image.md new file mode 100644 index 0000000000..30b7e9cbdc --- /dev/null +++ b/changelog/unreleased/revad-eos-docker-image.md @@ -0,0 +1,6 @@ +Enhancement: Docker image for cs3org/revad-eos + +Based on eos:c8_4.8.15 (Centos8, version 4.8.15). To be used when the +Reva daemon needs IPC with xrootd/eos via stdin/out. + +https://github.com/cs3org/reva/pull/1386 From aaf0fee87e9b5ece406d8545b5fbb91ea73b6c1b Mon Sep 17 00:00:00 2001 From: Samuel Alfageme Sainz Date: Tue, 5 Jan 2021 16:32:00 +0100 Subject: [PATCH 3/3] 'custom_dns' in docker build steps to workaround dind DNS issues Ref. https://github.com/drone-plugins/drone-docker/issues/193 Note: this disables cloud.drone.io from building the images, as the alternative DNS servers are internal-only --- .drone.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.drone.yml b/.drone.yml index 2ec7168078..0fabe3b46d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -74,6 +74,9 @@ steps: from_secret: dockerhub_username password: from_secret: dockerhub_password + custom_dns: + - 128.142.17.5 + - 128.142.16.5 - name: publish-docker-revad-latest pull: always @@ -86,6 +89,9 @@ steps: from_secret: dockerhub_username password: from_secret: dockerhub_password + custom_dns: + - 128.142.17.5 + - 128.142.16.5 - name: publish-docker-revad-eos-latest pull: always @@ -98,6 +104,9 @@ steps: from_secret: dockerhub_username password: from_secret: dockerhub_password + custom_dns: + - 128.142.17.5 + - 128.142.16.5 --- kind: pipeline @@ -223,6 +232,9 @@ steps: from_secret: dockerhub_username password: from_secret: dockerhub_password + custom_dns: + - 128.142.17.5 + - 128.142.16.5 - name: docker-revad-tag pull: always @@ -235,6 +247,9 @@ steps: from_secret: dockerhub_username password: from_secret: dockerhub_password + custom_dns: + - 128.142.17.5 + - 128.142.16.5 - name: docker-revad-eos-tag pull: always @@ -247,6 +262,9 @@ steps: from_secret: dockerhub_username password: from_secret: dockerhub_password + custom_dns: + - 128.142.17.5 + - 128.142.16.5 --- kind: pipeline