I've been chasing this for a couple of hours, and although I have it working, I'm unsure why it needs all this to work.
Summary
make generate fails with errors from keybase oneshot that there is no KEYBASE_USERNAME or TEAMS variables set.
Error parsing command line arguments: Need a --username option or a KEYBASE_USERNAME environment variable
2020/02/01 16:08:15 Failed to validate config: must specify at least one team via the TEAMS environment variable
Makefile:18: recipe for target 'generate' failed
First Workaround
Problem
Running the docker run command with the env.list shows that the env vars are present in the shell.
Setting entrypoint-generate.sh to print the value of $TEAMS and $KEYBASE_USERNAME also works
The sudo command doesn't export these, and since we aren't using -E with sudo (and can't because of -i), those vars appear to drop off.
Solution
add additional export lines for the missing variables
The previous workaround solved the problems of the vars not being available, but it generated a new error:
▶ ERROR No device found no device found for paper key
2020/02/01 17:09:08 Failed to validate config: failed to validate KEYBASE_USERNAME and KEYBASE_PAPERKEY: exit status 2
Problem
The previous workaround didn't solve the issue, and I noticed that when echoing the vars from entrypoint-generate.sh they included the double quotes:
I've been chasing this for a couple of hours, and although I have it working, I'm unsure why it needs all this to work.
Summary
make generate
fails with errors fromkeybase oneshot
that there is noKEYBASE_USERNAME
orTEAMS
variables set.First Workaround
Problem
docker run
command with theenv.list
shows that the env vars are present in the shell.entrypoint-generate.sh
to print the value of$TEAMS
and$KEYBASE_USERNAME
also workssudo
command doesn't export these, and since we aren't using-E
withsudo
(and can't because of-i
), those vars appear to drop off.Solution
export
lines for the missing variablesSecond Workaround
The previous workaround solved the problems of the vars not being available, but it generated a new error:
Problem
The previous workaround didn't solve the issue, and I noticed that when echoing the vars from
entrypoint-generate.sh
they included the double quotes:Solution
env.list
- they will be wrapped in single quotes when loaded into the container.I'll submit a PR later today.