Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to pass ipfs daemon arguments to the docker container #4373

Closed
jmunson opened this issue Nov 6, 2017 · 6 comments
Closed

Unable to pass ipfs daemon arguments to the docker container #4373

jmunson opened this issue Nov 6, 2017 · 6 comments

Comments

@jmunson
Copy link

jmunson commented Nov 6, 2017

Version information:

ipfs/go-ipfs:latest, currently 0.4.11

Type:

bug

Severity:

medium

Description:

It seems like #3573 and #3685 may have broken the ability to pass custom arguments to "ipfs daemon" while trying to make it possible to run other commands. Either that or I'm doing something wrong, but in either case the DEPRECATED error says what you should run instead, which also does not work and would be considered a bug.

Trying to launch a container with # docker run -it --rm ipfs/go-ipfs:latest -- daemon --writable --enable-pubsub-experiment --migrate=true says:

ipfs version 0.4.11
initializing IPFS node at /data/ipfs
generating 2048-bit RSA keypair...done
peer identity: QmPVwMfnaCEiRca6giQxbw8weYcVS59HCSgRgchZhXoEo9
to get started, enter:

	ipfs cat /ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme

DEPRECATED: arguments have been set but the first argument isn't 'daemon'
DEPRECATED: run 'docker run ipfs/go-ipfs daemon -- daemon --writable --enable-pubsub-experiment --migrate=true' instead
DEPRECATED: see the following PRs for more information:
DEPRECATED: * https://github.com/ipfs/go-ipfs/pull/3573
DEPRECATED: * https://github.com/ipfs/go-ipfs/pull/3685
Error: Unknown Command "daemon"

Did you mean this?

	daemon

USAGE
  ipfs daemon - Run a network-connected IPFS node.

  ipfs daemon [--init] [--routing=<routing>] [--mount] [--writable] [--mount-ipfs=<mount-ipfs>] [--mount-ipns=<mount-ipns>] [--unrestricted-api] [--disable-transport-encryption] [--enable-gc] [--manage-fdlimit=false] [--offline] [--migrate] [--enable-pubsub-experiment] [--enable-mplex-experiment=false]

  'ipfs daemon' runs a persistent ipfs daemon that can serve commands
  over the network. Most applications that use IPFS will do so by
  communicating with a daemon over the HTTP API. While the daemon is
  running, calls to 'ipfs' commands will be sent over the network to
  the daemon.

Use 'ipfs daemon --help' for more information about this command.

In short, it says run docker run ipfs/go-ipfs daemon -- daemon --writable --enable-pubsub-experiment --migrate=true. Running that produces:

Changing user to ipfs
ipfs version 0.4.11
initializing IPFS node at /data/ipfs
generating 2048-bit RSA keypair...done
peer identity: QmT3Hy5jdbdPhpqDNjNs6cFEz3a8UfhFwm3eQ6bQjSvLy3
to get started, enter:

	ipfs cat /ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme

Error: Unknown Command "daemon"

Did you mean this?

	daemon

USAGE
  ipfs daemon - Run a network-connected IPFS node.

  ipfs daemon [--init] [--routing=<routing>] [--mount] [--writable] [--mount-ipfs=<mount-ipfs>] [--mount-ipns=<mount-ipns>] [--unrestricted-api] [--disable-transport-encryption] [--enable-gc] [--manage-fdlimit=false] [--offline] [--migrate] [--enable-pubsub-experiment] [--enable-mplex-experiment=false]

  'ipfs daemon' runs a persistent ipfs daemon that can serve commands
  over the network. Most applications that use IPFS will do so by
  communicating with a daemon over the HTTP API. While the daemon is
  running, calls to 'ipfs' commands will be sent over the network to
  the daemon.

Use 'ipfs daemon --help' for more information about this command.
@ghost
Copy link

ghost commented Nov 6, 2017

Try docker run -it ipfs/go-ipfs --writable --enable-pubsub-experiment --migrate=true

@jmunson
Copy link
Author

jmunson commented Nov 6, 2017

That works, thank you. Should I close this or leave it open so that bin/container_daemon can be updated to not suggest the wrong thing?

@ghost
Copy link

ghost commented Nov 6, 2017

cc @kpcyrd

@badkk
Copy link

badkk commented Apr 4, 2019

@Stebalien I also want to know how we can do like ipfs bootstrap rm --all before we daemon in docker, seems this not supported by the current Dockerfile

@haydenyoung
Copy link

docker run -it ipfs/go-ipfs --writable --enable-pubsub-experiment --migrate=true

Running the above results in

Error: unknown option "writable"

Removing writable results in

Error: unknown option "enable-pubsub-experiment"

@Stebalien
Copy link
Member

@haydenyoung we've changed the docker init script. You'll have to run docker run -it ipfs/go-ipfs daemon --writable

Closing this issue as out of date and resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants