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 <oli@tableflip.io>
Oli Evans committed
Feb 13, 2020 at 14:39 UTC
aa3ca14197f37562f00f38575810a407dbc51899
2 files changed
+5
-2
Dockerfile
+5
-1
@@ -16,11 +16,15 @@ RUN cd $SRC_DIR \
16
17
COPY . $SRC_DIR
18
19
+# Preload an in-tree but disabled-by-default plugin by adding it to the IPFS_PLUGINS variable
20
+# e.g. docker build --build-arg IPFS_PLUGINS="foo bar baz"
21
+ARG IPFS_PLUGINS
22
+
23
# Build the thing.
24
# Also: fix getting HEAD commit hash via git rev-parse.
25
RUN cd $SRC_DIR \
26
&& mkdir .git/objects \
23
- && make build GOTAGS=openssl
27
+ && make build GOTAGS=openssl IPFS_PLUGINS=$IPFS_PLUGINS
28
29
# Get su-exec, a very minimal tool for dropping privileges,
30
# and tini, a very minimal init daemon for containers
plugin/plugins/peerlog/peerlog.go
-1
@@ -40,7 +40,6 @@ func (*peerLogPlugin) Version() string {
40
41
// Init initializes plugin
42
func (*peerLogPlugin) Init(*plugin.Environment) error {
43
- fmt.Println("peerLogPlugin enabled - PeerIDs will be logged")
43
return nil
44
}
45