Envbuilder in Coder: wrong user is used when cache is enabled
Hello, when I build image for the first time, the correct user, specified in
.devcontainer
is used. But when the pod is restarted and image is pulled from cache, it ALWAYS uses root
user which then fails, because only the specified user has private SSH key in their .ssh
which can pull from remote repository. This happens regardless of ENVBUILDER_REMOTE_REPO_BUILD_MODE
set to true
or false
.
devcontainer:
8 Replies
<#1293171628468867234>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Without cache:
With cache:
hey @molitann, could you send your template over?
cc: @Cian
Hey @molitann can you also upload your Dockerfile? I'm able to repro this without the provider in the mix, it looks like it's related to when a user gets created as part of the devcontainer customizations
I'm guessing that
remoteUser
should probably override whatever else gets auto-detected?
try with containerUser
instead of remoteUser
Oh yes that did the trick! Thank you
I set both and the user is now correctly set even when the whole image is cached. Should be probably mentioned somewhere in the docs
Thanks @molitann ! Will add to the docs.