You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Docker files there are several cases of writing to /etc/profile.d/alicevision.sh as a way of persisting environment variables. Unless I am mistaken these variable's are only used by the build scripts in the Docker images/containers. There is an issue with this however as RUN (in the Dockerfile) and docker run from the command line do not execute login scripts under profile.d. There are several sources for this but this page explains it nicely.
Basically all of the shells launched by Docker are non-login shells, meaning they do not execute login scripts in /etc/profile(.d) unless specifically invoked as a login shell.
This will clarify what the command is doing in the context of the Docker container while also properly persisting environment variable across RUN commands and through the layers in the multistage build.
If the alicevision.sh script is used elsewhere I could not find reference to it but please correct me if I'm wrong.
In the Docker files there are several cases of writing to
/etc/profile.d/alicevision.sh
as a way of persisting environment variables. Unless I am mistaken these variable's are only used by the build scripts in the Docker images/containers. There is an issue with this however asRUN
(in the Dockerfile) anddocker run
from the command line do not execute login scripts underprofile.d
. There are several sources for this but this page explains it nicely.Basically all of the shells launched by Docker are non-login shells, meaning they do not execute login scripts in
/etc/profile(.d)
unless specifically invoked as a login shell.I propose rewriting lines such as:
AliceVision/docker/Dockerfile_ubuntu_deps
Lines 64 to 65 in 7d73bc0
This will clarify what the command is doing in the context of the Docker container while also properly persisting environment variable across
RUN
commands and through the layers in the multistage build.If the
alicevision.sh
script is used elsewhere I could not find reference to it but please correct me if I'm wrong.See #1790
The text was updated successfully, but these errors were encountered: