coder / sail

Deprecated: Instant, pre-configured VS Code development environments.
https://sail.dev
MIT License
629 stars 36 forks source link

link gitconfig and ssh to `.sail/Dockerfile` via a share #171

Closed teddy-codes closed 5 years ago

teddy-codes commented 5 years ago

Is this something that we should do via a share just to make working with the repo easier?

Edit: It is documented here: https://sail.dev/docs/concepts/labels/ as a recommendation, but is this something that we want?

ammario commented 5 years ago

Not sure what you mean exactly.

.gitconfig and .ssh is already shared into the container by ubuntu-dev.

teddy-codes commented 5 years ago

Hm, then maybe we should update the docs to note that both of them are auto?

teddy-codes commented 5 years ago

Also, I am not sure that you understood what I meant.. image happens when I try to commit from inside the current sail instance.

ammario commented 5 years ago

Ahh, I think the .gitconfig share was removed at some point.

I think we can add it here

https://github.com/cdr/sail/blob/master/images/ubuntu-dev/Dockerfile#L1-L4

Any objections @nathanpotter ?

nathanpotter commented 5 years ago

If the ~/.gitconfig mount source doesn't exist, sail will create it as a directory by default. I think that's why we decided to keep it out of the ubuntu-dev image

nathanpotter commented 5 years ago

I know we discussed for a bit with @nhooyr what we should do when a mount source doesn't exist, but I don't think creating the dir makes sense for a scenario like this.

Should we just log an error and not mount it in if it doesn't exist instead of creating it as a dir?

teddy-codes commented 5 years ago

how would I go about mounting it without maintaining my own fork?

teddy-codes commented 5 years ago

Realized that hats will do this for us.