From aa3ca14197f37562f00f38575810a407dbc51899 Mon Sep 17 00:00:00 2001 From: Oli Evans Date: Thu, 13 Feb 2020 14:39:58 +0000 Subject: [PATCH] feat: pass IPFS_PLUGINS to docker build - allow IPFS_PLUGINS build-arg to be passed to docker build command - remove annoying logging from peerlog plugin that appears multiple times in docker logs usage: docker build --build-arg IPFS_PLUGINS="foo bar baz" License: MIT Signed-off-by: Oli Evans --- Dockerfile | 6 +++++- plugin/plugins/peerlog/peerlog.go | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3383594c9..e406e3055 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,11 +16,15 @@ RUN cd $SRC_DIR \ COPY . $SRC_DIR +# Preload an in-tree but disabled-by-default plugin by adding it to the IPFS_PLUGINS variable +# e.g. docker build --build-arg IPFS_PLUGINS="foo bar baz" +ARG IPFS_PLUGINS + # Build the thing. # Also: fix getting HEAD commit hash via git rev-parse. RUN cd $SRC_DIR \ && mkdir .git/objects \ - && make build GOTAGS=openssl + && make build GOTAGS=openssl IPFS_PLUGINS=$IPFS_PLUGINS # Get su-exec, a very minimal tool for dropping privileges, # and tini, a very minimal init daemon for containers diff --git a/plugin/plugins/peerlog/peerlog.go b/plugin/plugins/peerlog/peerlog.go index 39122df00..f5126fe41 100644 --- a/plugin/plugins/peerlog/peerlog.go +++ b/plugin/plugins/peerlog/peerlog.go @@ -40,7 +40,6 @@ func (*peerLogPlugin) Version() string { // Init initializes plugin func (*peerLogPlugin) Init(*plugin.Environment) error { - fmt.Println("peerLogPlugin enabled - PeerIDs will be logged") return nil }