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

Add postgis image #138

Closed
wants to merge 2 commits into from
Closed
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
6 changes: 6 additions & 0 deletions services/postgis/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
COPY files/docker-entrypoint-initdb.d /docker-entrypoint-initdb.d

ENV POSTGRES_DB=tugboat
ENV POSTGRES_PASSWORD=tugboat

HEALTHCHECK CMD /bin/nc -z 127.0.0.1 5432
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -e

psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE USER tugboat WITH PASSWORD 'tugboat';
GRANT ALL PRIVILEGES ON DATABASE tugboat TO tugboat;
ALTER DATABASE tugboat OWNER TO tugboat;
EOSQL
8 changes: 8 additions & 0 deletions services/postgis/manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function getTags() {
((newer_than=365*12*60*60))
curl -Ls https://registry.hub.docker.com/v2/repositories/postgis/postgis/tags?page_size=1024 |
jq -r '[.results[] | select((.images | length) > 0 and (.last_updated | sub("\\.[0-9]+Z"; "Z") | fromdate) > (now - '"$newer_than"')) | {name: .name, digest: .images[0].digest}] | group_by(.digest) | map([.[].name] | join(",")) | .[]' |
grep -v -e beta -e rc -e alpine
Comment on lines +2 to +5
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I really have no idea what is the policy for tags support.
I saw somewhere in the docs that alpine version are not recommended. Feedbacks are welcome :)

Copy link
Contributor

Choose a reason for hiding this comment

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

This looks great, nice work!

}
NAME="tugboat-postgis"
gido marked this conversation as resolved.
Show resolved Hide resolved
FROM="postgis/postgis"
2 changes: 2 additions & 0 deletions services/postgis/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec docker-entrypoint.sh postgres