kaniko/pkg/commands
Aris Buzachis 61312a95ae
fix(WORKDIR): use the config.User for the new dir permissions (#2269)
WORKDIR ignores the currently set USER and creates the new directories
with the root user ownership.

This changes that, by executing a chown after the mkdir if needed, and
also handle the case where the provided USER is an uid and the passwd
file is not available to resolve to the username.

Fixes #2259

Signed-off-by: Aris Buzachis <buzachis.aris@gmail.com>

Signed-off-by: Aris Buzachis <buzachis.aris@gmail.com>
2022-09-28 21:18:40 -04:00
..
add.go Fix .dockerignore for build context copies in later stages (#1447) 2020-10-08 12:47:14 -07:00
arg.go Fix resolving arguments over multi-stage build (#1928) 2022-02-10 09:22:21 -08:00
base_command.go better shdTakeSnapshot 2020-06-06 19:49:34 -07:00
cache.go fmt 2020-04-30 17:07:18 -07:00
cache_test.go remove read succesS 2020-04-30 15:18:39 -07:00
cmd.go Fix bug with docker compatibility 2020-01-13 21:18:54 -08:00
cmd_test.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
commands.go add cache run command option (#2032) 2022-08-09 08:35:00 -04:00
copy.go fix: getUIDandGID is able to resolve non-existing users and groups (#2106) 2022-07-12 10:21:37 -04:00
copy_test.go fix: Refactor `LayersMap` to correct old strange code behavior (#2066) 2022-05-17 20:30:58 -04:00
entrypoint.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
entrypoint_test.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
env.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
env_test.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
expose.go fix: Refactor `LayersMap` to correct old strange code behavior (#2066) 2022-05-17 20:30:58 -04:00
expose_test.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
fake_commands.go add unit tests for caching run and copy 2019-12-10 09:29:10 -08:00
healthcheck.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
label.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
label_test.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
onbuild.go fix: Refactor `LayersMap` to correct old strange code behavior (#2066) 2022-05-17 20:30:58 -04:00
onbuild_test.go Fixing lint issues. Adding tests for COPY command. Fixing issue with copying files out of snapshots 2019-09-16 10:48:31 -07:00
run.go add cache run command option (#2032) 2022-08-09 08:35:00 -04:00
run_marker.go add cache run command option (#2032) 2022-08-09 08:35:00 -04:00
run_test.go fix: getUIDandGID is able to resolve non-existing users and groups (#2106) 2022-07-12 10:21:37 -04:00
shell.go Update linter and fix errors 2019-12-21 12:27:14 -08:00
shell_test.go Update linter and fix errors 2019-12-21 12:27:14 -08:00
stopsignal.go fix: Refactor `LayersMap` to correct old strange code behavior (#2066) 2022-05-17 20:30:58 -04:00
stopsignal_test.go Update linter and fix errors 2019-12-21 12:27:14 -08:00
user.go fix: getUIDandGID is able to resolve non-existing users and groups (#2106) 2022-07-12 10:21:37 -04:00
user_test.go fix: getUIDandGID is able to resolve non-existing users and groups (#2106) 2022-07-12 10:21:37 -04:00
volume.go fix: Refactor `LayersMap` to correct old strange code behavior (#2066) 2022-05-17 20:30:58 -04:00
volume_test.go Update linter and fix errors 2019-12-21 12:27:14 -08:00
workdir.go fix(WORKDIR): use the config.User for the new dir permissions (#2269) 2022-09-28 21:18:40 -04:00
workdir_test.go fix(WORKDIR): use the config.User for the new dir permissions (#2269) 2022-09-28 21:18:40 -04:00