Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Rework entry point scripts to run 'listenTcp' command as non-root #3292

Merged
merged 2 commits into from
Mar 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ else
fi

# Signal that Consul is ready for services blocked waiting on Consul
/edgex-init/security-bootstrapper --confdir=/edgex-init/res listenTcp \
exec su-exec consul /edgex-init/security-bootstrapper --confdir=/edgex-init/res listenTcp \
--port="${STAGEGATE_REGISTRY_READYPORT}" --host="${STAGEGATE_REGISTRY_HOST}"
if [ $? -ne 0 ]; then
echo "$(date) failed to gating the consul ready port, exits"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ done
echo "$(date) ${STAGEGATE_KONGDB_HOST} is initialized"

# Signal that Postgres is ready for services blocked waiting on Postgres
/edgex-init/security-bootstrapper --confdir=/edgex-init/res listenTcp \
exec su-exec postgres /edgex-init/security-bootstrapper --confdir=/edgex-init/res listenTcp \
--port="${STAGEGATE_KONGDB_READYPORT}" --host="${STAGEGATE_KONGDB_HOST}"
if [ $? -ne 0 ]; then
echo "$(date) failed to gating the postgres ready port, exits"
Expand Down
2 changes: 1 addition & 1 deletion cmd/security-secretstore-setup/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RUN make cmd/security-file-token-provider/security-file-token-provider \

FROM alpine:3.12

RUN apk add --update --no-cache ca-certificates dumb-init curl
RUN apk add --update --no-cache ca-certificates dumb-init curl su-exec

LABEL license='SPDX-License-Identifier: Apache-2.0' \
copyright='Copyright (c) 2019: Dell Technologies, Inc.'
Expand Down
2 changes: 1 addition & 1 deletion cmd/security-secretstore-setup/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ echo "$(date) Changing ownership of secrets to ${EDGEX_USER}:${EDGEX_GROUP}"
chown -Rh ${EDGEX_USER}:${EDGEX_GROUP} /tmp/edgex/secrets

# Signal tokens ready port for other services waiting on
/edgex-init/security-bootstrapper --confdir=/edgex-init/res listenTcp \
exec su-exec ${EDGEX_USER} /edgex-init/security-bootstrapper --confdir=/edgex-init/res listenTcp \
--port="${STAGEGATE_SECRETSTORESETUP_TOKENS_READYPORT}" --host="${STAGEGATE_SECRETSTORESETUP_HOST}"
if [ $? -ne 0 ]; then
echo "$(date) failed to gating the tokens ready port"
Expand Down