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

How do you access the host environment variables within the sail file?

teddy-codes opened this issue · comments

commented

I am looking to add a share to my project.

How would I go about evaluating dirname $SSH_AUTH_SOCK before adding it to the share?

commented

Possibly support a --docker-flag array of arguments that are directly passed to the docker command? Not sure if that would be the best solution though

This is definitely a limitation currently with share labels. We've discussed evaluating environment variables in share paths, but thought it may get pretty messy.

The --docker-flag option could work, but on the other hand it may be overly generic. @ammario what are your thoughts?

Also, by default your $SSH_AUTH_SOCK should be mounted in if it exists, and the ENV should be set correctly inside the container

commented

Maybe, the reason why I thought not is because of .gitconfig re: #171. I still think that mounting envs would be useful (for example, NPM_TOKEN) which cannot be present in the .sal/Dockerfile since it is under source control.

Yeah I agree, I'll add a card to the board for passing ENVs and ENV mounts