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

Enhancements to the standalone dev container #14

Merged
merged 3 commits into from Jun 28, 2022
Merged

Conversation

pvetere
Copy link
Member

@pvetere pvetere commented Jun 21, 2022

I've decoupled the standalone dev container from the VS Code one. This
allows us to better customize the standalone development experience.

As part of this, I've added a parameter to the script that allows the
user to "target" the container to a particular source directory.
Before, it was only possible to edit the contents of the current repo.

I've also renamed docker-shell.sh to dev-shell to be slightly more
descriptive and concise.

I've decoupled the standalone dev container from the VS Code one.  This
allows us to better customize the standalone development experience.

As part of this, I've added a parameter to the script that allows the
user to "target" the container to a particular source directory.
Before, it was only possible to edit the contents of the current repo.

I've also renamed `docker-shell.sh` to `dev-shell` to be slightly more
descriptive and concise.
@esoterra
Copy link
Collaborator

The idea of keeping them linked as much as possible is a good goal in abstract, but they are different use cases with different dynamics so I think this is a good idea. After they've been separated, we should consider using more of the VS Code magic in the dev container to make things cleaner. They've done a lot to make some things "just work" that I'm hoping will make some weird permissions problems I've seen go away.

Copy link
Contributor

@carlsverre carlsverre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Building an entire image for each unique UID/GID seems less ideal than just mapping the UID/GID at runtime. Eventually we should push the docker image (and also figure out how to slim it down below 1GB) to help people quickstart.

The way that runtime uid/gid works with docker is like so:

  • create a user/group in the docker image with UID 1000 and GID 1000
  • use the --user flag with docker run: docker run --user $UID:$GID
  • within the container, it will transparently map UID 1000 to $UID outside the container (same with GID)

@pvetere
Copy link
Member Author

pvetere commented Jun 21, 2022

@carlsverre Totally agree about not having to bake in the UID/GID. I just couldn't figure out the magic sauce to get it to happen. I'll try the method you suggested.

README.md Outdated Show resolved Hide resolved
Co-authored-by: Kyle Brown <kylebrw@gmail.com>
@esoterra esoterra merged commit 34e23d0 into main Jun 28, 2022
@esoterra esoterra deleted the dev-shell-updates branch June 28, 2022 15:54
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

Successfully merging this pull request may close these issues.

None yet

3 participants