kaniko/pkg/commands
Lukas aad03dc285
fix: getUIDandGID is able to resolve non-existing users and groups (#2106)
* fix: getUIDandGID is able to resolve non-existing users and groups

A common pattern in dockerfiles is to provide a plain uid and gid number, which doesn't neccesarily exist inside the os.

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* test: add chown dockerfile

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore: format

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore: add comment

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* tests: fix chown dockerfile

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* refactor: split up getIdsFromUsernameAndGroup func

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* fix: implement raw uid logic for LookupUser

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* test: add dockerfiles for integration test

* fix: lookup user error message

* test: add dockerfiles for non-existing user testcase

* fix: forgot error check

* tests: fix syscall credentials test

* chore: add debug output for copy command

* tests: set specific gid for integration dockerfile

* tests: fix syscall credentials test

github runner had the exact uid that i was testing on, so the groups were not empty

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* tests: fix test script

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore: apply golangci lint checks

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* fix: reset file ownership in createFile if not root owned

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore: logrus.Debugf missed format variable

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore(test-script): remove go html coverage

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* test(k8s): increase wait timeout

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>
2022-07-12 10:21:37 -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 caching copy layers back (#1518) 2020-12-11 00:25:03 -08: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 fix: getUIDandGID is able to resolve non-existing users and groups (#2106) 2022-07-12 10:21:37 -04:00
run_marker.go fix: Refactor `LayersMap` to correct old strange code behavior (#2066) 2022-05-17 20:30:58 -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: Refactor `LayersMap` to correct old strange code behavior (#2066) 2022-05-17 20:30:58 -04:00
workdir_test.go feat: ensure relative WorkingDir work 2020-05-04 15:48:39 +02:00