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

ENOENT when running via podman #635

Open
asymmetric opened this issue Mar 15, 2021 · 3 comments
Open

ENOENT when running via podman #635

asymmetric opened this issue Mar 15, 2021 · 3 comments

Comments

@asymmetric
Copy link
Contributor

What's the problem you want solved?

I followed the Docker instructions, while under the hood using podman.

After bulding the image with docker build --tag oasis --file contrib/Dockerfile ., I tried running it with:

docker run --mount type=volume,src=ssb,target=/home/node/.ssb --publish 127.0.0.0:3000:3000 --rm oasis

(note: I had to specify type=volume above)

This failed with

2021-03-15T14:10:19.602Z oasis No configuration file found at /home/node/.config/oasis/default.json, using built-in default values.
2021-03-15T14:10:19.603Z oasis No custom style file found at /home/node/.config/oasis/custom-style.css, ignoring this stylesheet.
2021-03-15T14:10:20.790Z oasis Listening on http://0.0.0.0:3000
/home/node/app/src/index.js:132
    throw err;
    ^

Error: spawn xdg-open ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn xdg-open',
  path: 'xdg-open',
  spawnargs: [ 'http://0.0.0.0:3000' ]
}

Worth pointing out that I'm running NixOS, and that xdg-open is at /nix/store/41iyp469y2c9bpkg8rggyk2hr6w5m73z-xdg-utils-1.1.3/bin/xdg-open.

@christianbundy
Copy link
Member

Thanks for reporting this problem. Could you try adding the --no-open flag?

@asymmetric
Copy link
Contributor Author

That did get me further:

❯ podman run --mount type=volume,src=ssb,target=/home/node/.ssb --publish 127.0.0.0:3000:3000 --rm oasis node . --host 0.0.0.0 --allow-host localhost --no-open
WARN[0000] Found default OCIruntime /nix/store/hcr9g9vwvp3iqrh137qh80y7ai3ijbbi-crun-0.14.1/bin/crun path which is missing from [engine.runtimes] in containers.conf
WARN[0000] Found default OCIruntime /nix/store/hcr9g9vwvp3iqrh137qh80y7ai3ijbbi-crun-0.14.1/bin/crun path which is missing from [engine.runtimes] in containers.conf
WARN[0000] Found default OCIruntime /nix/store/hcr9g9vwvp3iqrh137qh80y7ai3ijbbi-crun-0.14.1/bin/crun path which is missing from [engine.runtimes] in containers.conf
2021-03-30T20:58:41.043Z oasis No configuration file found at /home/node/.config/oasis/default.json, using built-in default values.
2021-03-30T20:58:41.044Z oasis No custom style file found at /home/node/.config/oasis/custom-style.css, ignoring this stylesheet.
2021-03-30T20:58:42.131Z oasis Listening on http://0.0.0.0:3000
2021-03-30T20:58:42.145Z oasis Starting Scuttlebutt service
ssb-friends: stream legacy api used
about-name-warmup: 82.179ms

(Note that I had to re-specify the contents of CMD, because it gets overwritten by any args one passes to run - ENTRYPOINT would be a better choice, AFAIK)

Turns out that the instructions in docs/with-docker.md have an error: --publish 127.0.0.0:3000:3000 should be --publish 127.0.0.1:3000:3000.

After changing that, I can access oasis at 0.0.0.0:3000!

@asymmetric
Copy link
Contributor Author

asymmetric commented Mar 30, 2021

See #647 for a documentation fix re: port mapping.

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

No branches or pull requests

2 participants