-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
flag: flag.Parse()
seemingly doing nothing in Docker container
#52212
Comments
so what do we run to reproduce the issue? |
I can put together a small sample project in just a second. |
git clone https://github.com/5HT2C/go-52212
cd go-52212
docker build -t go-52212 .
docker run --name go-52212 --mount type=bind,source="/home/ubuntu/fs",target=/go-52212-files --network host -d --env PLUGIN_DIR="testing" go-52212
docker logs go-52212 Welp, I did put it together, and it doesn't have the same issue. I'm really confused as to what broke here, on taro's end. |
Even stranger, values that aren't even set in my program flags show as non-default values, eg
|
I genuinely can't figure this one out golang/go#52212
What is the output of the unexpected flag values with your example above? Does it need to use plugin to reproduce? Thanks. |
Duplicate of #36263 |
Oh, thank you, that solved it. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes. I can only reproduce this issue in the
golang:1.18.0
image (notgolang:1.18.0-alpine
).What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Dockerfile: https://github.com/5HT2/taro-bot/blob/8c98aa5584f3e7e4d3fd3267284e12b6caa3090f/Dockerfile
main.go: https://github.com/5HT2/taro-bot/blob/8c98aa5584f3e7e4d3fd3267284e12b6caa3090f/main.go
I'm having an issue where none of my flags are being parsed.
all i know is
I know all this via printing the raw values in order to do some sort of debugging. I have no idea how to get around this or fix it, let alone where the bug stems from.
I do know that this does not happen on the
golang:1.18.0-alpine3.15
image. I cannot use this image because Alpine does not have the built-in gcc tools necessary to usego build -buildmode=plugin
. This does happen ongolang.1.18.0
in my testing, which is Debian.What did you expect to see?
I expected my flags to be parsed.
What did you see instead?
My flags are not parsed.
The text was updated successfully, but these errors were encountered: