-
Notifications
You must be signed in to change notification settings - Fork 92
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
Improve PostgreSQL and minio container builds #4696
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4696 +/- ##
=====================================
Coverage 93.8% 93.8%
=====================================
Files 367 367
Lines 30275 30229 -46
Branches 3580 3575 -5
=====================================
- Hits 28383 28351 -32
+ Misses 1226 1219 -7
+ Partials 666 659 -7 |
c7ff933
to
34fc3e2
Compare
- Leverage entrypoint script in minio image to set UID and GID - Change UID and GID of postgres account to match current user - Move container files into directories to unclutter the project root - Both USER_ID and GROUP_ID are required environment variables - Update the .env.example file with new required variables
Trino runs as root inside the container, so it is not possible to recursively change owenership of the trino data files. Leave that alone for now. Only set ownership and mode of the directories that are bind mounts and not their contents. Remove a minio build in the make target setting permissions. That seems to have been added to that target by mistake.
- Use mc anonymous command since mc policy is deprecated - Remove koku- prefix from service name
Use the correct environment variables used be the entry point script to create the user account
Docker only allows variable substitution in .env files.
This ensures containers are named consistently. This can be overridden by setting COMPOSE_PROJECT_NAME.
34fc3e2
to
9fb6ad4
Compare
One other thing I would like to do is unify the service and container names. All containers would have a Here is what the containers look like currently:
This is what I would like to change them to:
I can do that in a separate PR if it's less disruptive. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Description
Make the UID and GID of the
postgres
user in the container match those of the current user. This makes the PostgreSQL data files easy to manage from the container host. Build a PostgreSQL image with the correct UID, GID, and our entry point script baked in. The fewer bind mounts the better.Use environment variables to configure the UID and GID of the minio container. There is an entry point script that sets up the user account, so we don't need to maintain a separate container file.
Move container files into
dev/containers
. This keeps the repo root clean and makes builds easier.Testing
make docker-up-min
make docker-logs
make load-test-customer-data
Notes
I would like to move all the dev container related files and data to
dev/containers
.