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

Does /usr/bin/env cause problems in docker containers with non-standard app users? #39

Open
taylordowns2000 opened this issue May 31, 2022 · 1 comment

Comments

@taylordowns2000
Copy link
Member

I'm still getting a spooky error on lightning:

NODE_PATH=./priv/openfn/lib PATH=./priv/openfn/bin:/app/erts-12.2.1/bin:/app/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
cmd:
core execute \
 -o /tmp/output-1654009907-7-3fgxeg.json
 -s /tmp/state-1654009907-7-f6usl6.json \
 -l \
 -e /tmp/expression-1654009907-7-9zc4q1.json \
sh: 1: core: not found

Two things jump out at me: first the language pack is blank (and that's likely a deployment/config issue with lightning) but second the NODE_PATH seems 👌 but we're getting an error (sh: 1: core: not found) that I'd expect to see if the NODE_PATH was not properly set. I can confirm this when I run the following commands by hand:

$ NODE_PATH=./priv/openfn/lib PATH=./priv/openfn/bin:/app/erts-12.2.1/bin:/app/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin core execute
core execute

run an expression

Options:
      --version          Show version number                           [boolean]
  -l, --language         resolvable language/adaptor path             [required]
  -e, --expression       target expression to execute                 [required]
  -s, --state            Path to initial state file.                  [required]
  -o, --output           Path to write output.
  -t, --test             test mode, no HTTP requests
      --nc, --noConsole  if set to true, removes console.log for security
      --help             Show help                                     [boolean]

Examples:
  core execute -l salesforce -e foo.js -s   Using the salesforce language pack,
  state.json                                execute foo.js to STDOUT

Missing required arguments: language, expression, state
$ core execute
/bin/sh: 3: core: not found

@stuartc , is it possible that Rambo isn't respecting the NODE_PATH stuff because it's expecting something to be accessible first in /usr/bin/env?

"/usr/bin/env",

@taylordowns2000
Copy link
Member Author

@stuartc , while this is fixed for Lightning, do we still want to address this (and/or some potential finicky path stuff) on Engine?

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

1 participant