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

postCreateCommand doesn't run in the right context? #1084

Closed
cgestes opened this issue May 23, 2024 · 3 comments
Closed

postCreateCommand doesn't run in the right context? #1084

cgestes opened this issue May 23, 2024 · 3 comments
Assignees
Labels

Comments

@cgestes
Copy link

cgestes commented May 23, 2024

What happened?

[16:37:48] debug Run post create commands...
[16:37:48] info Run command : ./bash/local/codespaces_init.sh...
[16:37:48] debug Executing command : [su codespace -c ./bash/local/codespaces_init.sh]...
[16:37:48] error ./bash/local/codespaces_init.sh: line 3: pyenv: command not found

pyenv is installed in our Dockerfile, it is working in codespace.

What did you expect to happen instead?
pyenv should be found.

.devcontainer:

{
	"build": {
		"dockerfile": "../Dockerfile"
	},
	"postCreateCommand": "./bash/local/codespaces_init.sh"
}

Local Environment:

  • DevPod Version: 0.5.7
  • Operating System: mac
  • ARCH of the OS: ARM64

DevPod Provider:

  • Local/remote provider: docker
@samsaket7
Copy link

samsaket7 commented Jun 20, 2024

Hi @cgestes,

I’m encountering a similar issue. Were you able to find a resolution?

Edit: In my case, it appears that the ENV variable for PATH set in the Dockerfile didn’t take effect. Exporting the PATH in the post-create script resolved the problem for me.

@pascalbreuninger
Copy link
Member

Hi @cgestes @samsaket7, this should also be fixed with #1184 and available with the next release

@eguiraud
Copy link

Hi, this is still broken in the latest version for me: #1234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants