Skip to content

Commit

Permalink
Fix: Add daemon arg to docker run in dockeripfs plugin.
Browse files Browse the repository at this point in the history
This commit adds `daemon` to the end of the `docker run` args whenever the user
passes in `<ipfs-args>` to `iptb start -- <ipfs-args>`. Without this additional
argument, the IPFS daemon logs a deprecation warning. We don't want to pass
`daemon` into `docker run` when the user hasn't provided additional args,
because `docker run` has default args when nothing else is passed.

For more info, see:

-   ipfs/kubo#3573
-   ipfs/kubo#3685

License: MIT
Signed-off-by: David Grisham <dgrisham@mines.edu>
  • Loading branch information
dgrisham committed Sep 10, 2018
1 parent d447c6e commit 517e0ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/ipfs/docker/dockeripfs.go
Expand Up @@ -184,6 +184,9 @@ func (l *DockerIpfs) Start(ctx context.Context, wait bool, args ...string) (test
}

fargs := []string{"run", "-d", "-v", l.dir + ":/data/ipfs", l.image}
if len(args) > 0 {
fargs = append(fargs, "daemon")
}
fargs = append(fargs, args...)
cmd := exec.Command("docker", fargs...)
out, err := cmd.CombinedOutput()
Expand Down

0 comments on commit 517e0ab

Please sign in to comment.