Caching home directory for remoteUser after feature install #774
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds coalescing logic following how commons-utils feature handles home directories for users that do not have one from source image. [Updated]Caching container user home directory and remote user home directory after any feature installs, this will increase build time in a matter of milliseconds but will ensure that after each feature layer, the
_CONTAINER_USER_HOME
and_REMOTE_USER_HOME
will be updated and cached for the next feature to be installed.This should solve issue #331 .
Open to suggestions on how to improve, adding same coalesce for
_CONTAINER_USER_HOME
does not break anything, but didn't want to include that until told otherwise by maintainers.Locally tested as follows:
node devcontainer.js build --config test/devcontainer.json --workspace-folder .
node devcontainer.js up --config test/devcontainer.json --workspace-folder .
docker exec -it <CONTAINER_NAME> sh
shell-history
feature installed correctly for the newly created userTested with host: