joshuanianji / devcontainer-features

My custom devcontainer features
MIT License
2 stars 3 forks source link

`chown` in lifecycle scripts #40

Closed joshuanianji closed 9 months ago

joshuanianji commented 9 months ago

The issue I have is that the edits to .bashrc and .zshrc that chown the mounted folders are not persisted if I use my dotfiles, since my dotfiles replaces the .zshrc file.

I think the way to go is to add the chown script in a lifecycle script, probably postStartCommand or postAttachCommand since these are not dependent on rc files at all. See: https://github.com/stuartleeks/dev-container-features/issues/12

I'll have to look into which lifecycle script works best.