Skip to content

I don't want to have to authenticate a local dev container if the host machine is already configured #8

@petebachant

Description

@petebachant

Adding something like:

  "initializeCommand": "bash -c 'echo \"CALKIT_TOKEN=$(calkit config get token)\" > .env.temp' && bash -c 'echo \"CALKIT_DVC_TOKEN=$(calkit config get dvc_token)\" >> .env.temp'",
  "mounts": [
    "source=${localEnv:HOME}/.calkit,target=/home/vscode/.calkit,type=bind,consistency=cached"
  ],
  "postCreateCommand": "bash -c 'source .env.temp && echo \"export CALKIT_TOKEN=\\\"$CALKIT_TOKEN\\\"\" >> ~/.bashrc && echo \"export CALKIT_DVC_TOKEN=\\\"$CALKIT_DVC_TOKEN\\\"\" >> ~/.bashrc && rm -f .env.temp'",
  "updateContentCommand": "while ! docker info > /dev/null 2>&1; do sleep 1; done && conda init bash && . /opt/conda/bin/activate && calkit check envs",
  "postStartCommand": ". /opt/conda/bin/activate; mkdir -p $HOME/.cache; calkit config github-codespace > $HOME/.cache/calkit-config.log 2>&1 || true; calkit pull > $HOME/.cache/calkit-pull.log 2>&1 || true"
}

to the dev container spec works, but we probably want to ensure this is robust when running in Codespaces.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions