It shouldn’t matter whether you run k6 in docker or directly with the binary. This looks like a potential bug in k6. Since k6 v0.27.0 is quite old, can you try updating to the latest k6 version, v0.35.0, to see if that resolves the issue? And if it doesn’t, can you please share a cleaned up version of your script (without any sensitive data) that allows us to reproduce the issue?
Instead of k6-v0.35.0-linux64.tar.gz, try to use k6-v0.35.0-linux-amd64.tar.gz or k6-v0.35.0-linux-arm64.tar.gz, depending on what is your load generator machine architecture.