From 34922de8dd7255027492d2f05b7241da0c890392 Mon Sep 17 00:00:00 2001 From: Dave Whitla Date: Wed, 4 Dec 2019 10:10:36 +1000 Subject: [PATCH 1/2] Updated base to buster for postgis 2.5.1 not available in stretch --- 11/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/11/Dockerfile b/11/Dockerfile index 29af4398b4..8cda43a1bb 100644 --- a/11/Dockerfile +++ b/11/Dockerfile @@ -1,5 +1,5 @@ # vim:set ft=dockerfile: -FROM debian:stretch-slim +FROM debian:buster-slim RUN set -ex; \ if ! command -v gpg > /dev/null; then \ From 035f76896e52f91e151d45f8cf4295c95d2e83db Mon Sep 17 00:00:00 2001 From: Dave Whitla Date: Tue, 31 Dec 2019 17:00:17 +1000 Subject: [PATCH 2/2] Correct Postgres 11 --- .idea/.gitignore | 2 ++ .idea/encodings.xml | 6 ++++++ .idea/misc.xml | 9 +++++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ 11/Dockerfile | 15 +++------------ 11/Makefile | 10 ++++++++++ 11/build_push_image.sh | 18 ++++++++++++++++++ postgres.iml | 9 +++++++++ 9 files changed, 71 insertions(+), 12 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/encodings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 11/Makefile create mode 100755 11/build_push_image.sh create mode 100644 postgres.iml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000000..5c98b42884 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,2 @@ +# Default ignored files +/workspace.xml \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000000..97626ba454 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000000..d22b02bd88 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000..2c3be543e5 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000..35eb1ddfbb --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/11/Dockerfile b/11/Dockerfile index 8cda43a1bb..d03631a039 100644 --- a/11/Dockerfile +++ b/11/Dockerfile @@ -71,7 +71,7 @@ RUN set -ex; \ apt-key list ENV PG_MAJOR 11 -ENV PG_VERSION 11.6-1.pgdg90+1 +ENV PG_VERSION 11.5-1+deb10u1 RUN set -ex; \ \ @@ -82,22 +82,13 @@ RUN set -ex; \ case "$dpkgArch" in \ amd64|i386|ppc64el) \ # arches officialy built by upstream - echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main $PG_MAJOR" > /etc/apt/sources.list.d/pgdg.list; \ + echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main $PG_MAJOR" > /etc/apt/sources.list.d/pgdg.list; \ apt-get update; \ ;; \ *) \ # we're on an architecture upstream doesn't officially build for # let's build binaries from their published source packages - echo "deb-src http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main $PG_MAJOR" > /etc/apt/sources.list.d/pgdg.list; \ - \ - case "$PG_MAJOR" in \ - 9.* | 10 ) ;; \ - *) \ -# https://github.com/docker-library/postgres/issues/484 (clang-6.0 required, only available in stretch-backports) -# TODO remove this once we hit buster+ - echo 'deb http://deb.debian.org/debian stretch-backports main' >> /etc/apt/sources.list.d/pgdg.list; \ - ;; \ - esac; \ + echo "deb-src http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main $PG_MAJOR" > /etc/apt/sources.list.d/pgdg.list; \ \ tempDir="$(mktemp -d)"; \ cd "$tempDir"; \ diff --git a/11/Makefile b/11/Makefile new file mode 100644 index 0000000000..cc470fe73c --- /dev/null +++ b/11/Makefile @@ -0,0 +1,10 @@ + +all: build + +build: + docker build -t moovement/postgis:11-2.5 . + +update: + echo "docker run --rm -v $$(pwd):/work -w /work buildpack-deps ./update.sh" + +.PHONY: all build update diff --git a/11/build_push_image.sh b/11/build_push_image.sh new file mode 100755 index 0000000000..9252ed8c30 --- /dev/null +++ b/11/build_push_image.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -e + +PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +pushd "${PROJECT_ROOT}" +: "${DOCKER_IMAGE:='moovement/postgres:11'}" +: "${DOCKER_REGISTRY:='docker.moovement.co'}" +: "${REPO:="${DOCKER_REGISTRY}/${DOCKER_IMAGE}"}" + +docker build -t ${DOCKER_IMAGE} . +#docker build -t moovement/postgres:11 . +docker tag ${DOCKER_IMAGE} ${REPO} +#docker tag moovement/postgres:11 docker.moovement.co/moovement/postgres:11 +#eval "$(aws ecr get-login --no-include-email --region "${AWS_REGION}")" +docker push "${REPO}" +#docker push docker.moovement.co/moovement/postgres:11 +#ecs deploy ${ECS_CLUSTER_NAME} ${ECS_SERVICE_NAME} --image ${ECS_CONTAINER_NAME} ${REPO} --timeout 6000 +popd diff --git a/postgres.iml b/postgres.iml new file mode 100644 index 0000000000..8021953ed9 --- /dev/null +++ b/postgres.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file