Skip to content

Commit

Permalink
Docker: use 'golang:alpine' base & install mailcap for mime-type support
Browse files Browse the repository at this point in the history
Update changelog to reflect this
  • Loading branch information
SamuAlfageme committed Jun 16, 2021
1 parent 1d7a4c5 commit 68d9799
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
5 changes: 4 additions & 1 deletion Dockerfile.revad
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 8 additions & 3 deletions changelog/unreleased/set-cgo-enabled-0-flag.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
Bugfix: Set CGO_ENABLED flag for 'scratch' based docker builds
Bugfix: Set 'golang:alpine' as revad base image & CGO_ENABLED flag for 'scratch' based docker builds

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
https://github.com/cs3org/reva/pull/1766
https://github.com/cs3org/reva/pull/1797

0 comments on commit 68d9799

Please sign in to comment.