Skip to content

DRAFT -- for your review only#7

Draft
drmikecrowe wants to merge 2 commits intokevinMEH:mainfrom
drmikecrowe:main
Draft

DRAFT -- for your review only#7
drmikecrowe wants to merge 2 commits intokevinMEH:mainfrom
drmikecrowe:main

Conversation

@drmikecrowe
Copy link

I really don't have an expectation that you're going to want to merge this, but I feel like you might be interested in what I did after exploring your project, starting with using Podman instead of docker (in theory this supports both, but I haven't regression tested it).

NOTE: This is my first pass -- I'm positive there will be more changes. This is the first version where I think everything is mostly running.

First and foremost, it's running in user space and all the files are mounted as my user, not root.

Some of the features that this also has is the ability to use 1Password inside the container as well as my YubiKey.

As I'm writing this up just for your benefit, I'm also thinking about how each person might set up their own development environment. I think using Mise is perfect because rather than specifying each of the development tools that are needed, we can put all of that in the TOML file instead. So container will simply install whatever the user has already specified in their configuration.

Was there a reason that you didn't merge in your home .claude folder? I chose to do it with the exception of the authentication so that all of my session history would roll up, but I'm not sure if that's really ideal.

My --zai param is how I point cloud code at Z.ai's GLM models. I think this is something pretty specific to me, but might be of interest.

LMK if you want to connect somewhere (discord, bluesky, etc) to chat about this.

@kevinMEH
Copy link
Owner

Hello, thank you for your contribution. I'm glad you found Code Container useful!

Supporting other containerization tools like Podman is something that I can look into in the future. However for the current use case, Docker is good enough and unless there's a specific deficiency in Docker, we most likely will stick to Docker only for now.

Letting users customize their dev environment via a config file is definitely an interesting idea. However, installing a foreign tool like mise that is not widely used would break one of the key principles of container, that being generality. container is designed to come with a general set of tools; if users would like to add their own, they can modify the Dockerfile and add their own. Packaging a tool like mise and then asking users to include a mise.toml file in every project is unnecessary for most users' use cases.

Was there a reason that you didn't merge in your home .claude folder? I chose to do it with the exception of the authentication so that all of my session history would roll up, but I'm not sure if that's really ideal.

I'm not really sure what you mean by this? By default, the setup script copies your entire ~/.claude directory into the local .claude. If you're asking why I didn't just mount ~/.claude directly, it's mostly I didn't want container to be intrusive; it will only use what is in the local .claude folder. If a user doesn't want to mount their ~/.claude, then they can simply not copy their config over.

On providers: I've been using Z.ai along with some other coding plans and I have also found it a bit annoying to switch providers in CC. My solution from a few months ago was to create a script that can be used for hotswapping API keys and base URLs in .claude/settings.json; see the cc-providers-swap branch for more details. However, I never merged it as it was a really specific problem and because I don't really use CC anymore. Take a look and maybe you'll find it useful.

I appreciate the time you took to submit this contribution! My goal was to create a tool that everyone can use and customize and I'm happy to see all the ways that you've customized container for yourself. That being said, for a variety of mostly philosophical reasons I will have to hold back for now.

PS: A rewrite of container into a TypeScript NPM package is in the works. Perhaps you'll find it more easy to work with.

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.

2 participants