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

Use apt.postgresql.org.sh to install Postgres #602

Merged
merged 1 commit into from
Jan 12, 2024
Merged

Use apt.postgresql.org.sh to install Postgres #602

merged 1 commit into from
Jan 12, 2024

Conversation

theory
Copy link
Collaborator

@theory theory commented Jan 11, 2024

Borrowed from the pgxn-tools Dockerfile, developed under the guidance of Postgres apt maintainer Christoph Berg. Importantly, purge postgresql-client-common before installing the pgdb Postgres, since it conflicts with the pgdb package. This also allows the PATH configuration to be removed, as the /usr/bin Postgres commands are owned by pgdb.

@theory theory requested review from sjmiller609 and removed request for ianstanton, vrmiguel and EvanHStanton January 11, 2024 22:32
@theory
Copy link
Collaborator Author

theory commented Jan 11, 2024

Oh yay, a new error:

Executing in container: "test -e ./postgis-3.4.0/configure"
Executing in container: "su postgres -c bash -c \"././postgis-3.4.0/configure && make -C ./postgis-3.4.0 check && echo done\""
configure: error: source directory already configured; run "make distclean" there first

Makes sense since the Dockerfile runs ./configure && make. Should it not?

@theory theory requested a review from ianstanton January 11, 2024 23:22
@theory theory force-pushed the pgdb-script branch 3 times, most recently from 6983493 to e7d7804 Compare January 12, 2024 20:19
Borrowed from the [pgxn-tools `Dockerfile`], developed under the
guidance of Postgres apt maintainer Christoph Berg. Importantly, purge
`postgresql-client-common` before installing the pgdb Postgres, since it
conflicts with the pgdb package. This also allows the PATH configuration
to be removed, as the `/usr/bin` Postgres commands are owned by pgdb.

While at it, remove redundant apt packages from the call to `apt-get` in
the `Dockerfile`.

  [pgxn-tools `Dockerfile`]: https://github.com/pgxn/docker-pgxn-tools/blob/main/Dockerfile
@theory
Copy link
Collaborator Author

theory commented Jan 12, 2024

Oh yay, a new error:

Fixed in #606; moved the postgis changes after the fix, in #607.

Copy link
Contributor

@sjmiller609 sjmiller609 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I assume no version locking necessary on that script

@theory
Copy link
Collaborator Author

theory commented Jan 12, 2024

Looks good. I assume no version locking necessary on that script

No idea. I've used it for a few years. You can look at the source though. I think it lets you run multiple versions at once; they all live in version-specific directories.

@theory
Copy link
Collaborator Author

theory commented Jan 12, 2024

I think it lets you run multiple versions at once

That said, the Dockerfile removes the script, so it can't be used to install another version without downloading it again.

@theory theory merged commit f9c6237 into main Jan 12, 2024
37 checks passed
@theory theory deleted the pgdb-script branch January 12, 2024 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants