devcontainers / devcontainers/spec
postCreateCommand deletes git config
- Dominant language
- No language data
- Stars
- 5.7k
- Forks
- 496
- PR merge metrics
- No merged PRs in 30d
Description
Hi all,
I see inconsistent result when I run
`"postCreateCommand": "git config --global user.signingkey /home/mambauser/.ssh/id_ed25519.pub"`
to redirect my keys to docker folder. All other global configurations (which are moved to docker automatically) are not in container. This does not happen if I change it to `postStartCommand`. I would expect that result would be the same. Simplified devcontainer.json where it happens is here:
{
"name": "name",
"build":{
"dockerfile": "Dockerfile",
"context": "../",
"args": { "HTTP_PROXY": "${localEnv:HTTP_PROXY}",
"HTTPS_PROXY": "${localEnv:HTTPS_PROXY}"
}
},
"containerEnv": { "HTTP_PROXY": "${localEnv:HTTP_PROXY}",
"HTTPS_PROXY": "${localEnv:HTTPS_PROXY}"
},
"mounts": [
"source=${localEnv:USERPROFILE}/.ssh,target=/home/mambauser/.ssh,type=bind,consistency=cached"
],
"postCreateCommand": "git config --global user.signingkey /home/mambauser/.ssh/id_ed25519.pub"
}
and the dockerfile:
FROM mambaorg/micromamba
ARG MAMBA_DOCKERFILE_ACTIVATE=1
RUN micromamba config append channels conda-forge
# Install Git
USER root
RUN apt-get update && apt-get install -y git
USER $MAMBA_USER
Contributor guide
Assessment
This issue has not been assessed yet.