coder / sail

Deprecated: Instant, pre-configured VS Code development environments.

Home Page:https://sail.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve documentation for hats.

teddy-codes opened this issue · comments

commented

I am trying to use hats myself, but I am having a hard time understanding the documentation. I I understand that there is supposed to be another file, but not entirely sure how it all ties in. Any insight? I can update the docs once I fully understand.

Sorry for the docs lacking on hats, essentially hats allow a developer to put their own configuration on top of a repo's .sail/Dockerfile environment.

So if you like zsh, you can change your shell to zsh. If you have certain apt packages that you like to include in all of your environments, you can add that to your hat as well. If you store your ~/.gitconfig or ~/.ssh keys at uncommon locations, you can mount those in through share labels using the correct source.

Basically it just allows the developer to personalize every project environment they work on so that they don't have to leave their favorite tooling and configuration behind.

commented

That is totally understandable, but how do I use them? I tried the example on sail.dev (also, in the repo somewhere and it did not seem to work as expected ). I kept getting the error in issue #178 (when it was actually attempting to apply) and sometimes it would simply just not apply. The proper command is -hat, right?

commented

was going to work on this, but my knowledge is still very vague of hats. If someone could pick it up, that would be good.

I'd also like to see an improvement on the documentation here. It's not clear on how to get started or an example of a hat that adds something custom to the existing .sail/Dockerfile

Sorry about the lack of documentation regarding hats. You can check the hat-examples directory in this repository for a couple of simple hats you could use.

Then to install a hat, just put a Dockerfile in an empty folder somewhere on your computer. You can use default_hat in your configuration file or sail run --hat path/to/hat. The path should be the path to the folder holding the Dockerfile.

e.g.:

$ ls ~/sail
Dockerfile

$ sail run --hat ~/sail cdr/sail
...