I have repo A with .devcontainer, but A depends on repo B, so I want to COPY B into A's devcontainer during build (Dockerfile) to build B before A's decvontainer starts.
Moreover, I don't want to hardcode host path to B into Dockerfile, so I tried to use environment variable, but it appears to be that VSCode don't see my host env PATH_TO_B (I specified it using export command inside ~/.zshrc and restarted terminal before starting vscode).
There is part of A devcontainer's Dockerfile I use to check if VSCode can see host env:
ARG PATH_TO_B
ENV PATH_TO_B=$PATH_TO_B
RUN echo "export ${PATH_TO_B}" >> /home/user/.bashrc
Inside running container .bashrc contains empty export line, which means that VSCode don't see my host's PATH_TO_B env variable.
Moreover, I found out that I can't do it even with hardcoding my path: VSCode devcontainer's Dockerfile can't see anything outside .devcontainer directory (so neither ../ nor absolute paths work).
Is it intended behavior or bug? How can I achieve my first goal (copy local folder into devcontainer without hardcoding path)?