mirror of
https://github.com/argoproj/argo-cd
synced 2026-05-05 23:58:21 +00:00
* Add "chown" to gpg/keys in "start-local" target that so that repo-server can access gpg keys. * * Set -u uid:gid in the docker run commands so that test images are run under the current user. * test Procfile processes will not need to perform "su" to default user (which has the current user's uid/gid) * Remove chown in start-e2e-local * clean up, remove "bash -c" * Test containers are run as uid 0 which allows uid_entrypoint.sh to perform some user setup. uid_entrypoint.sh creates a non-root user (default) and enables passwordless sudo for that user. The container entry point command is run as the non-root user. "goreman start" does "sudo" to to the processes that need root permission including sshd, fcgiwrap, and nginix. The other processes are running as the non-root user. * use /bin/bash * change back to sh * Docker image to create unpriveleged testuser and enable passwordless sudo for that user
12 lines
No EOL
279 B
Bash
Executable file
12 lines
No EOL
279 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
if test "$(id -u)" == "0" -a "${USER_ID}" != ""; then
|
|
useradd -u ${USER_ID} -d /home/user -s /bin/bash ${USER_NAME:-default}
|
|
chown -R "${USER_NAME:-default}" ${GOCACHE}
|
|
fi
|
|
|
|
export PATH=$PATH:/usr/local/go/bin:/go/bin
|
|
export GOROOT=/usr/local/go
|
|
|
|
exec "$@" |