-
Notifications
You must be signed in to change notification settings - Fork 599
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
added the user and set the necessary permissions #2167
Open
rock-007
wants to merge
7
commits into
GoogleCloudPlatform:main
Choose a base branch
from
rock-007:bug/fixing-root-privilage-issue
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c45df33
added the user and set the necessory permissions
rock-007 c7326f5
Trigger build with /gcbrun
rock-007 b344a3b
Added the logic to create user & group only if it doesnt exist
rock-007 0434a42
removing the conditional check as postgres user already exist
rock-007 462e875
added the security context for the non root user
rock-007 6080e4a
added the missing security contexts in the K8s file
rock-007 e7adf61
Fix up security contexts
bourgeoisor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,12 @@ FROM postgres:16.3-alpine@sha256:de3d7b6e4b5b3fe899e997579d6dfe95a99539d154abe03 | |
# Need to get coreutils to get the date bash function working properly: | ||
RUN apk add --no-cache coreutils && rm -rf /var/cache/apk/* | ||
|
||
# Change ownership of the necessary directories | ||
RUN chown -R postgres:postgres /var/lib/postgresql /var/run/postgresql | ||
|
||
# Set thte correct permissions | ||
RUN chmod -R 0700 /var/lib/postgresql/data && chmod -R 0755 /var/run/postgresql | ||
Comment on lines
+19
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mathieu-benoit do you think that's all that was needed? Seems too good to be true but maybe I'm overthinking it |
||
|
||
# Files for initializing the database. | ||
COPY initdb/0_init_tables.sql initdb/1_create_transactions.sh /docker-entrypoint-initdb.d/ | ||
RUN chmod 755 /docker-entrypoint-initdb.d/0_init_tables.sql /docker-entrypoint-initdb.d/1_create_transactions.sh |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a start but it's also missing security contexts to prevent all access to root:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added these now to the
ledger-db.yaml
file.