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

Wait for container initialization before devcontainer setup #453

Open
darsor opened this issue Mar 28, 2024 · 1 comment
Open

Wait for container initialization before devcontainer setup #453

darsor opened this issue Mar 28, 2024 · 1 comment

Comments

@darsor
Copy link

darsor commented Mar 28, 2024

I'm using a container that has its own init system. Part of the init process of the container is to create the container user. I'm running into an issue where the devcontainer implementation starts trying to get information about the remoteUser before that user is even created.

Is there any method to block first-time container inspection/setup until a command finishes? I was hoping to use onCreateCommand for this, but it is run after the container is probed, not immediately after it is created.

#299 might solve this issue.

@samruddhikhandale
Copy link
Member

Hi 👋

Currently, there is no built-in method in Dev Container configuration to block the setup process until a certain command finishes. The onCreateCommand is indeed run after the container is probed, not immediately after it is created.

#299 might solve this issue.

This would definitely help you.

In the meanwhile, can you create the user as part of your Dockerfile or a local Feature? Using https://github.com/devcontainers/features/tree/main/src/common-utils might be helpful as well.

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

No branches or pull requests

2 participants