-
Notifications
You must be signed in to change notification settings - Fork 71
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
Generate docker images automatically #415
Conversation
I believe that the PR is complete now. |
@mschoema : Among the suggestions, there will likely be some that are not urgent or can wait, I'll let you know once I've completed the PR review. |
Since there are no GitHub CI runs for this pull request, it's challenging to confirm whether the proposal is valid. I would suggest a script similar to this: #!/usr/bin/env bash
set -Eeo pipefail
# shellcheck disable=SC2043
# mobilitydb local build matrix
for mobilitydb_ver in v1.1.0-beta1 ; do
for pg_major in 16 15 14 13 12 ; do
for postgis_ver in 3.4 ; do
docker build --pull --progress=plain \
--build-arg POSTGRES_VERSION=$pg_major \
--build-arg POSTGIS_VERSION=$postgis_ver \
--build-arg MOBILITYDB_TAG=$mobilitydb_ver \
-t testmobilitydb:${pg_major}-${postgis_ver}-${mobilitydb_ver} \
-f docker/Dockerfile\
.
done
done
done Currently, the size of the completed MobilityDB Docker images ( ~1.44GB ) might be reduced by running the installation, compilation, mobilityDb installation, and removal of programs required for building all within a single RUN statement. Even if size is not the most urgent issue right now, it will need to be addressed in the future.
|
I would also note that the CI script could perhaps be made more contributor-friendly. Docker build with Pull requestThe docker-postgis uses this approach: The Docker build always runs, as seen at https://github.com/postgis/docker-postgis/blob/master/.github/workflows/main.yml, but the "docker push" does not execute for pull requests, as indicated by Testing MobilityDB images:Later on, adding MobilityDB Docker image testing could be beneficial.
and a minimal PostGIS test: I can assist with this if needed. |
I have completed the testing. I have minimally tested the new MobilityDB images and made some comments and suggestions. |
@ImreSamu
As you suggested, I also added a test script to build to the images locally. Concerning your second comment, I think I will leave this for a future improvement. Note that the issue is also present in the test script. For the moment I would thus conclude this PR and leave the CI build and test in PR's for a later improvement. What are your thoughts on this? |
The changes in the code look good! Thank you! I have just one important request, which personally matters to me. For compatibility reasons, I would suggest renaming my proposal - in this section: - && cp ../docker/initdb-mobilitydb.sh /docker-entrypoint-initdb.d/mobilitydb.sh \
+ && cp ../docker/initdb-mobilitydb.sh /docker-entrypoint-initdb.d/11_mobilitydb.sh \ This naming convention follows the guidelines set in the upstream Docker-PostgreSQL documentation, You can read more about this in the Docker-Postgres Documentation: Thank you in advance. |
Sounds good, I'll update the file name to |
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.
Thank You!
Approved! |
Ok, I managed to get both entrypoint files to run correctly. |
No description provided.