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

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

teddy-codes opened this issue · comments

commented

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?

Not sure what you mean exactly.

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

commented

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

commented

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

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 ?

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

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?

commented

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

commented

Realized that hats will do this for us.