From 5582b1807c3889b9ab007b818497c43b05958128 Mon Sep 17 00:00:00 2001 From: Samuel Alfageme Sainz Date: Wed, 16 Jun 2021 12:25:05 +0200 Subject: [PATCH] Docker: use 'golang:alpine' base & install mailcap for mime-type support Update changelog to reflect this --- Dockerfile.revad | 5 ++++- changelog/unreleased/set-cgo-enabled-0-flag.md | 11 ++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Dockerfile.revad b/Dockerfile.revad index fec40722bf..7d6dbc5d3c 100644 --- a/Dockerfile.revad +++ b/Dockerfile.revad @@ -36,7 +36,10 @@ RUN make build-revad-docker && \ RUN mkdir -p /etc/revad/ && echo "" > /etc/revad/revad.toml -FROM scratch +FROM golang:alpine + +RUN apk --no-cache add \ + mailcap EXPOSE 9999 10000 diff --git a/changelog/unreleased/set-cgo-enabled-0-flag.md b/changelog/unreleased/set-cgo-enabled-0-flag.md index 5ea66fc500..f7295ec06a 100644 --- a/changelog/unreleased/set-cgo-enabled-0-flag.md +++ b/changelog/unreleased/set-cgo-enabled-0-flag.md @@ -1,8 +1,13 @@ -Bugfix: Set CGO_ENABLED flag for 'scratch' based docker builds +Bugfix: 'golang:alpine' as base image & CGO_ENABLED just for the CLI + +Some of the dependencies used by revad need CGO to be enabled in order to +work. We also need to install the 'mime-types' in alpine to correctly +detect them on the storage-providers. The CGO_ENABLED=0 flag was added to the docker build flags so that it will produce a static build. This allows usage of the 'scratch' image for -reduction of the docker image size. +reduction of the docker image size (e.g. the reva cli). https://github.com/cs3org/reva/issues/1765 -https://github.com/cs3org/reva/pull/1766 \ No newline at end of file +https://github.com/cs3org/reva/pull/1766 +https://github.com/cs3org/reva/pull/1797