diff --git a/gotrue/Dockerfile b/gotrue/Dockerfile deleted file mode 100644 index f1af05d..0000000 --- a/gotrue/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -# Generated from https://github.com/puzzad/containers/gotrue/Dockerfile.gotpl -# BOM: {"github:puzzad/gotrue":"v1.4","image:ghcr.io/greboid/dockerfiles/golang":"6418f0fd483f14315fa0e743cd88fc0a43aff23c944b3b2d8627775f982263c0"} - -FROM ghcr.io/greboid/dockerfiles/golang@sha256:6418f0fd483f14315fa0e743cd88fc0a43aff23c944b3b2d8627775f982263c0 as build - -ARG TAG=v1.4 -RUN apk add build-base -RUN git -c advice.detachedHead=false clone --depth=1 -b $TAG --single-branch https://github.com/puzzad/gotrue /go/src/github.com/netlify/gotrue; -WORKDIR /go/src/github.com/netlify/gotrue -RUN make deps -RUN make build - -FROM ghcr.io/greboid/dockerfiles/alpine:latest -RUN adduser -D -u 1000 netlify - -RUN apk add --no-cache ca-certificates -COPY --from=build /go/src/github.com/netlify/gotrue/gotrue /usr/local/bin/gotrue -COPY --from=build /go/src/github.com/netlify/gotrue/migrations /usr/local/etc/gotrue/migrations/ -COPY --from=build /go/src/github.com/netlify/gotrue/templates /usr/local/etc/gotrue/templates/ - -ENV GOTRUE_DB_MIGRATIONS_PATH /usr/local/etc/gotrue/migrations -ENV TEMPLATE_DIR /usr/local/etc/gotrue/templates - -USER netlify -CMD ["gotrue"] - diff --git a/gotrue/Dockerfile.gotpl b/gotrue/Dockerfile.gotpl deleted file mode 100644 index b518b31..0000000 --- a/gotrue/Dockerfile.gotpl +++ /dev/null @@ -1,23 +0,0 @@ -FROM {{image "ghcr.io/greboid/dockerfiles/golang"}} as build - -ARG TAG={{github_tag "puzzad/gotrue"}} -RUN apk add build-base -RUN git -c advice.detachedHead=false clone --depth=1 -b $TAG --single-branch https://github.com/puzzad/gotrue /go/src/github.com/netlify/gotrue; -WORKDIR /go/src/github.com/netlify/gotrue -RUN make deps -RUN make build - -FROM ghcr.io/greboid/dockerfiles/alpine:latest -RUN adduser -D -u 1000 netlify - -RUN apk add --no-cache ca-certificates -COPY --from=build /go/src/github.com/netlify/gotrue/gotrue /usr/local/bin/gotrue -COPY --from=build /go/src/github.com/netlify/gotrue/migrations /usr/local/etc/gotrue/migrations/ -COPY --from=build /go/src/github.com/netlify/gotrue/templates /usr/local/etc/gotrue/templates/ - -ENV GOTRUE_DB_MIGRATIONS_PATH /usr/local/etc/gotrue/migrations -ENV TEMPLATE_DIR /usr/local/etc/gotrue/templates - -USER netlify -CMD ["gotrue"] - diff --git a/meta/Dockerfile b/meta/Dockerfile deleted file mode 100644 index 9711846..0000000 --- a/meta/Dockerfile +++ /dev/null @@ -1,33 +0,0 @@ -# Generated from https://github.com/puzzad/containers/meta/Dockerfile.gotpl -# BOM: {"github:supabase/postgres-meta":"v0.67.0","image:ghcr.io/greboid/dockerfiles/alpine":"bb09baaefa0022cb709bfb42e8852359b208eb2a6baa0beff38eaa3a610141a7"} - -FROM ghcr.io/greboid/dockerfiles/alpine@sha256:bb09baaefa0022cb709bfb42e8852359b208eb2a6baa0beff38eaa3a610141a7 as app - -ARG TAG=v0.67.0 - -RUN set -eux; \ - apk add npm git python3 g++ make bash; \ - git -c advice.detachedHead=false clone --depth=1 -b $TAG --single-branch https://github.com/supabase/postgres-meta.git /app; \ - mkdir /dep; \ - cd /dep; \ - cp /app/package* .; \ - npm clean-install; \ - cd /app; \ - cp -r /dep/node_modules .; \ - npm run build; - -FROM ghcr.io/greboid/dockerfiles/alpine@sha256:bb09baaefa0022cb709bfb42e8852359b208eb2a6baa0beff38eaa3a610141a7 - -RUN apk add nodejs - -WORKDIR /app -COPY --from=app /app/node_modules node_modules -COPY --from=app /app/dist dist -COPY --from=app /app/package.json ./ -COPY --from=app /app/package-lock.json ./ - -RUN ls -lR /app - -ENV PG_META_PORT=8080 -EXPOSE 8080 -CMD ["node", "dist/server/app.js"] diff --git a/meta/Dockerfile.gotpl b/meta/Dockerfile.gotpl deleted file mode 100644 index 4d7c074..0000000 --- a/meta/Dockerfile.gotpl +++ /dev/null @@ -1,30 +0,0 @@ -FROM {{image "ghcr.io/greboid/dockerfiles/alpine"}} as app - -ARG TAG={{github_tag "supabase/postgres-meta"}} - -RUN set -eux; \ - apk add npm git python3 g++ make bash; \ - git -c advice.detachedHead=false clone --depth=1 -b $TAG --single-branch https://github.com/supabase/postgres-meta.git /app; \ - mkdir /dep; \ - cd /dep; \ - cp /app/package* .; \ - npm clean-install; \ - cd /app; \ - cp -r /dep/node_modules .; \ - npm run build; - -FROM {{image "ghcr.io/greboid/dockerfiles/alpine"}} - -RUN apk add nodejs - -WORKDIR /app -COPY --from=app /app/node_modules node_modules -COPY --from=app /app/dist dist -COPY --from=app /app/package.json ./ -COPY --from=app /app/package-lock.json ./ - -RUN ls -lR /app - -ENV PG_META_PORT=8080 -EXPOSE 8080 -CMD ["node", "dist/server/app.js"] diff --git a/postgres-15/Dockerfile b/postgres-15/Dockerfile deleted file mode 100644 index 3eb8ace..0000000 --- a/postgres-15/Dockerfile +++ /dev/null @@ -1,111 +0,0 @@ -# Generated from https://github.com/puzzad/containers/postgres-15/Dockerfile.gotpl -# BOM: {"apk:binutils":"2.40-r7","apk:brotli-libs":"1.0.9-r14","apk:busybox":"1.36.1-r2","apk:busybox-binsh":"1.36.1-r2","apk:ca-certificates":"20230506-r0","apk:curl":"8.2.1-r0","apk:g++":"12.2.1_git20220924-r10","apk:gcc":"12.2.1_git20220924-r10","apk:gmp":"6.2.1-r3","apk:isl25":"0.25-r2","apk:libacl":"2.3.1-r3","apk:libatomic":"12.2.1_git20220924-r10","apk:libc-dev":"0.7.2-r5","apk:libcrypto3":"3.1.1-r3","apk:libcurl":"8.2.1-r0","apk:libformw":"6.4_p20230506-r0","apk:libgcc":"12.2.1_git20220924-r10","apk:libgomp":"12.2.1_git20220924-r10","apk:libhistory":"8.2.1-r1","apk:libidn2":"2.3.4-r1","apk:libintl":"0.21.1-r7","apk:libmenuw":"6.4_p20230506-r0","apk:libncurses++":"6.4_p20230506-r0","apk:libncursesw":"6.4_p20230506-r0","apk:libpanelw":"6.4_p20230506-r0","apk:libssl3":"3.1.1-r3","apk:libstdc++":"12.2.1_git20220924-r10","apk:libstdc++-dev":"12.2.1_git20220924-r10","apk:libunistring":"1.1-r1","apk:libxxhash":"0.8.2-r0","apk:linux-headers":"6.3-r0","apk:lz4-libs":"1.9.4-r4","apk:make":"4.4.1-r1","apk:mpc1":"1.3.1-r1","apk:mpfr4":"4.2.0_p12-r0","apk:musl":"1.2.4-r1","apk:musl-dev":"1.2.4-r1","apk:musl-locales":"0.1.0-r1","apk:ncurses-dev":"6.4_p20230506-r0","apk:ncurses-terminfo-base":"6.4_p20230506-r0","apk:nghttp2-libs":"1.55.1-r0","apk:openssl-dev":"3.1.1-r3","apk:pkgconf":"1.9.5-r0","apk:popt":"1.19-r2","apk:readline":"8.2.1-r1","apk:readline-dev":"8.2.1-r1","apk:rsync":"3.2.7-r4","apk:scanelf":"1.3.7-r1","apk:zlib":"1.2.13-r1","apk:zlib-dev":"1.2.13-r1","apk:zstd-libs":"1.5.5-r4","image:ghcr.io/greboid/dockerfiles/alpine":"bb09baaefa0022cb709bfb42e8852359b208eb2a6baa0beff38eaa3a610141a7","image:ghcr.io/greboid/dockerfiles/base":"9e288621372d4df4cbfa7f4cb2a110fd0e7e00362bc156e902e808924388984b","postgres15":"15.3"} - -FROM ghcr.io/greboid/dockerfiles/alpine@sha256:bb09baaefa0022cb709bfb42e8852359b208eb2a6baa0beff38eaa3a610141a7 as build - -ARG ARCHIVE_URL="https://ftp.postgresql.org/pub/source/v15.3/postgresql-15.3.tar.bz2" -ARG ARCHIVE_SUM="ffc7d4891f00ffbf5c3f4eab7fbbced8460b8c0ee63c5a5167133b9e6599d932" - -RUN set -eux; \ - apk add --no-cache \ - binutils=2.40-r7 \ - brotli-libs=1.0.9-r14 \ - busybox=1.36.1-r2 \ - busybox-binsh=1.36.1-r2 \ - ca-certificates=20230506-r0 \ - curl=8.2.1-r0 \ - g++=12.2.1_git20220924-r10 \ - gcc=12.2.1_git20220924-r10 \ - gmp=6.2.1-r3 \ - isl25=0.25-r2 \ - libacl=2.3.1-r3 \ - libatomic=12.2.1_git20220924-r10 \ - libc-dev=0.7.2-r5 \ - libcrypto3=3.1.1-r3 \ - libcurl=8.2.1-r0 \ - libformw=6.4_p20230506-r0 \ - libgcc=12.2.1_git20220924-r10 \ - libgomp=12.2.1_git20220924-r10 \ - libhistory=8.2.1-r1 \ - libidn2=2.3.4-r1 \ - libintl=0.21.1-r7 \ - libmenuw=6.4_p20230506-r0 \ - libncurses++=6.4_p20230506-r0 \ - libncursesw=6.4_p20230506-r0 \ - libpanelw=6.4_p20230506-r0 \ - libssl3=3.1.1-r3 \ - libstdc++=12.2.1_git20220924-r10 \ - libstdc++-dev=12.2.1_git20220924-r10 \ - libunistring=1.1-r1 \ - libxxhash=0.8.2-r0 \ - linux-headers=6.3-r0 \ - lz4-libs=1.9.4-r4 \ - make=4.4.1-r1 \ - mpc1=1.3.1-r1 \ - mpfr4=4.2.0_p12-r0 \ - musl=1.2.4-r1 \ - musl-dev=1.2.4-r1 \ - musl-locales=0.1.0-r1 \ - ncurses-dev=6.4_p20230506-r0 \ - ncurses-terminfo-base=6.4_p20230506-r0 \ - nghttp2-libs=1.55.1-r0 \ - openssl-dev=3.1.1-r3 \ - pkgconf=1.9.5-r0 \ - popt=1.19-r2 \ - readline=8.2.1-r1 \ - readline-dev=8.2.1-r1 \ - rsync=3.2.7-r4 \ - scanelf=1.3.7-r1 \ - zlib=1.2.13-r1 \ - zlib-dev=1.2.13-r1 \ - zstd-libs=1.5.5-r4 \ - ; \ - curl -sfLo postgresql.tar.bz2 $ARCHIVE_URL; \ - echo "$ARCHIVE_SUM *postgresql.tar.bz2" | sha256sum -wc -; \ - mkdir -p /usr/local/postgres; \ - tar -C /usr/local/postgres --strip-components 1 -xf postgresql.tar.bz2; \ - cd /usr/local/postgres; \ - ./configure \ - --with-system-tzdata=/usr/share/zoneinfo \ - --with-includes=/usr/local/include \ - --with-libraries=/usr/local/lib \ - --with-ssl=openssl; \ - make -j$(nproc) world; \ - make install-world; \ - make -C contrib install; \ - mkdir -p /src/data; \ - mkdir -p /src/run; \ - chmod 777 /src/run; \ - mkdir -p /etc/postgresql/; - -RUN set -eux; \ - DEPS=$(scanelf --needed --nobanner --format '%n#p' --recursive -l /usr/local /usr/local/bin/psql \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }');\ - mkdir /rootfs; \ - for dep in $DEPS; do \ - apk add ${dep}; \ - apk info -qL ${dep} | rsync -aq --files-from=- / /rootfs/; \ - done; - -FROM ghcr.io/greboid/dockerfiles/base@sha256:9e288621372d4df4cbfa7f4cb2a110fd0e7e00362bc156e902e808924388984b - -ENV LANG en_US.utf8 -ENV PGDATA=/var/lib/postgres/data -ENV PGHOST=127.0.0.1 -ENV PGUSER=postgres - -COPY --from=build /bin/sh /bin/sh -COPY --from=build /bin/more /bin/more -COPY --from=build /usr/bin/locale /usr/bin/locale -COPY --from=build /rootfs/ / -COPY --from=build /usr/local/pgsql /usr/local/ -COPY --from=build --chown=65532:65532 --chmod=750 /src/data /var/lib/postgres -COPY --from=build --chown=65532:65532 --chmod=777 /src/run /var/run/psql -COPY postgresql.conf /etc/postgresql.conf -COPY entry.sh /usr/local/bin/ - -STOPSIGNAL SIGINT - -ENTRYPOINT ["/usr/local/bin/entry.sh"] diff --git a/postgres-15/Dockerfile.gotpl b/postgres-15/Dockerfile.gotpl deleted file mode 100644 index bf29628..0000000 --- a/postgres-15/Dockerfile.gotpl +++ /dev/null @@ -1,59 +0,0 @@ -FROM {{image "ghcr.io/greboid/dockerfiles/alpine"}} as build - -ARG ARCHIVE_URL="{{postgres15_url}}" -ARG ARCHIVE_SUM="{{postgres15_checksum}}" - -RUN set -eux; \ - apk add --no-cache \ - {{range $key, $value := alpine_packages "curl" "gcc" "g++" "make" "readline-dev" "zlib-dev" "linux-headers" "musl-locales" "openssl-dev" "scanelf" "rsync" -}} - {{$key}}={{$value}} \ - {{end}}; \ - curl -sfLo postgresql.tar.bz2 $ARCHIVE_URL; \ - echo "$ARCHIVE_SUM *postgresql.tar.bz2" | sha256sum -wc -; \ - mkdir -p /usr/local/postgres; \ - tar -C /usr/local/postgres --strip-components 1 -xf postgresql.tar.bz2; \ - cd /usr/local/postgres; \ - ./configure \ - --with-system-tzdata=/usr/share/zoneinfo \ - --with-includes=/usr/local/include \ - --with-libraries=/usr/local/lib \ - --with-ssl=openssl; \ - make -j$(nproc) world; \ - make install-world; \ - make -C contrib install; \ - mkdir -p /src/data; \ - mkdir -p /src/run; \ - chmod 777 /src/run; \ - mkdir -p /etc/postgresql/; - -RUN set -eux; \ - DEPS=$(scanelf --needed --nobanner --format '%n#p' --recursive -l /usr/local /usr/local/bin/psql \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }');\ - mkdir /rootfs; \ - for dep in $DEPS; do \ - apk add ${dep}; \ - apk info -qL ${dep} | rsync -aq --files-from=- / /rootfs/; \ - done; - -FROM {{image "ghcr.io/greboid/dockerfiles/base"}} - -ENV LANG en_US.utf8 -ENV PGDATA=/var/lib/postgres/data -ENV PGHOST=127.0.0.1 -ENV PGUSER=postgres - -COPY --from=build /bin/sh /bin/sh -COPY --from=build /bin/more /bin/more -COPY --from=build /usr/bin/locale /usr/bin/locale -COPY --from=build /rootfs/ / -COPY --from=build /usr/local/pgsql /usr/local/ -COPY --from=build --chown=65532:65532 --chmod=750 /src/data /var/lib/postgres -COPY --from=build --chown=65532:65532 --chmod=777 /src/run /var/run/psql -COPY postgresql.conf /etc/postgresql.conf -COPY entry.sh /usr/local/bin/ - -STOPSIGNAL SIGINT - -ENTRYPOINT ["/usr/local/bin/entry.sh"] diff --git a/postgres-15/entry.sh b/postgres-15/entry.sh deleted file mode 100755 index 9554e01..0000000 --- a/postgres-15/entry.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -if [ -n "$POSTGRES_USER" ]; then - PGUSER=${POSTGRES_USER} -fi -if [ -n "$POSTGRES_PASSWORD" ]; then - PGPASSWORD=${POSTGRES_PASSWORD} -fi -if [ -z "$PGDATA" ]; then - PGDATA="/var/lib/postgres/data" -fi -if [ -z "$PGUSER" ]; then - PGUSER="postgres" -fi -if [ -z "$PGPASSWORD" ]; then - PGPASSWORD="password" -fi -if [ -z "$POSTGRES_DB" ]; then - POSTGRES_DB=$PGUSER -fi -if [ -n "$POSTGRES_HOST_AUTH_METHOD" ]; then - POSTGRES_HOST_AUTH_METHOD="scram-sha-256" -fi -if [ ! -s "$PGDATA" ]; then - initdb -U postgres --pwfile=<(echo "$PGPASSWORD") -D $PGDATA --no-instructions --auth-host ${POSTGRES_HOST_AUTH_METHOD} --auth-local trust - echo "local all all trust" > "$PGDATA/pg_hba.conf" - echo "host all all 127.0.0.1/32 trust" >> "$PGDATA/pg_hba.conf" - echo "host all all ::1/128 trust" >> "$PGDATA/pg_hba.conf" - echo "host all all all ${POSTGRES_HOST_AUTH_METHOD}" >> "$PGDATA/pg_hba.conf" - pg_ctl -D "$PGDATA" -o "-c listen_addresses='127.0.0.1'" -o "-p 5432" -o "-c unix_socket_directories='/var/run/psql'" -w start - echo "CREATE USER ${PGUSER} WITH PASSWORD '${PGPASSWORD}';CREATE DATABASE ${POSTGRES_DB} OWNER '${PGUSER}';" | psql -U postgres - pg_ctl -D "$PGDATA" -m fast -w stop - -else - echo "Data directory exists, not editing" -fi - -if [ -z "$@" ]; then - exec postgres -c config_file="/etc/postgresql.conf" -else - exec $@ -fi diff --git a/postgres-15/postgresql.conf b/postgres-15/postgresql.conf deleted file mode 100644 index 02c5c6b..0000000 --- a/postgres-15/postgresql.conf +++ /dev/null @@ -1,3 +0,0 @@ -listen_addresses = '*' -port = 5432 -unix_socket_directories = '' diff --git a/postgres/Dockerfile b/postgres/Dockerfile deleted file mode 100644 index 769ac51..0000000 --- a/postgres/Dockerfile +++ /dev/null @@ -1,234 +0,0 @@ -# Generated from https://github.com/puzzad/containers/postgres/Dockerfile.gotpl -# BOM: {"github:citusdata/pg_cron":"v1.4.2","github:eradman/pg-safeupdate":"1.4","github:iCyberon/pg_hashids":"v1.2.1","github:michelp/pgsodium":"v3.1.0","github:percona/pg_stat_monitor":"1.1.1","github:pgaudit/pgaudit":"1.7.0","github:pramsey/pgsql-http":"v1.5.0","github:supabase/pg_net":"v0.6.1","github:theory/pgtap/":"v1.2.0","regexurl:supabase-postgres":"14.1.0.102"} - -FROM ghcr.io/greboid/dockerfiles/golang:latest as go -RUN go install github.com/tianon/gosu@latest - -FROM debian:stable-slim as deb - -RUN set -eux; \ - apt update; \ - apt install -y --no-install-recommends --no-install-suggests \ - gpg \ - lsb-release \ - ca-certificates \ - libsodium23 \ - curl; \ - curl -Ss http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/postgres.gpg; \ - echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list; \ - echo "Package: *" > /etc/apt/preferences.d/postgres.pref; \ - echo "Pin: release o=apt.postgresql.org" >> /etc/apt/preferences.d/postgres.pref; \ - echo "Pin-Priority: 500" >> /etc/apt/preferences.d/postgres.pref; \ - rm -rf /var/lib/apt/lists/*; \ - apt update; \ - apt upgrade -y; \ - apt install -y --no-install-recommends --no-install-suggests \ - libelogind0; \ - rm -rf /var/lib/apt/lists/*; \ - rm -rf /var/cache/apt/archives ; \ - rm -rf /usr/share/doc/; \ - rm -rf /usr/share/man/; \ - rm -rf /usr/share/locale/; - -FROM deb as pgbase - -#Get Various versions -ARG POSTGRES=14.1.0.102 -ARG AUDIT=1.7.0 -ARG JWT=9742dab1b2f297ad3811120db7b21451bca2d3c9 -ARG HTTP=v1.5.0 -ARG WALJSON=wal2json_2_5 -ARG NET=v0.6.1 -ARG HASHIDS=v1.2.1 -ARG SODIUM=v3.1.0 -ARG CRON=v1.4.2 -ARG STAT=1.1.1 -ARG TAP=v1.2.0 -ARG UPDATE=1.4 - -#Install dependencies -RUN set -eux; \ - MAJORVERSION=$(echo $POSTGRES | cut -d. -f1); \ - apt update; \ - apt install -y --no-install-recommends --no-install-suggests \ - build-essential \ - git \ - libpq-dev \ - postgresql-server-dev-${MAJORVERSION} \ - postgresql-${MAJORVERSION} \ - libkrb5-dev \ - libsodium-dev \ - libcurl4-openssl-dev \ - libtool \ - automake \ - autoconf \ - pkgconf \ - libevent-dev \ - pandoc \ - libreadline-dev \ - bison \ - flex \ - libreadline8 \ - zlib1g \ - coreutils \ - zlib1g-dev; \ - rm -rf /var/lib/apt/lists/*; \ - rm -rf /var/cache/apt/archives ; \ - rm -rf /usr/share/doc/; \ - rm -rf /usr/share/man/; \ - rm -rf /usr/share/locale/; \ - git config --global advice.detachedHead false - -#Install pgaudit -RUN set -eux; \ - git clone --depth=1 -b $AUDIT --single-branch https://github.com/pgaudit/pgaudit.git /src/audit; \ - cd /src/audit; \ - make install USE_PGXS=1 PG_CONFIG=/usr/bin/pg_config; - -#Install pg_jwt -RUN set -eux; \ - git clone --depth=1 -b master --single-branch https://github.com/michelp/pgjwt /src/jwt; \ - cd /src/jwt; \ - git checkout $JWT; \ - make install; - -#Install pg_http -RUN set -eux; \ - git clone --depth=1 -b $HTTP --single-branch https://github.com/pramsey/pgsql-http.git /src/http; \ - cd /src/http; \ - make install; - -#Install wal2json -RUN set -eux; \ - git clone --depth=1 -b $WALJSON --single-branch https://github.com/eulerto/wal2json.git /src/wal2json; \ - cd /src/wal2json; \ - make install; - -#Install pg_net -RUN set -eux; \ - git clone --depth=1 -b $NET --single-branch https://github.com/supabase/pg_net.git /src/net; \ - cd /src/net; \ - make all; \ - make install; - -#Install pg_hashids -RUN set -eux; \ - git clone --depth=1 -b $HASHIDS --single-branch https://github.com/iCyberon/pg_hashids.git /src/hashids; \ - cd /src/hashids; \ - USE_PGXS=1 make install; - -#Install pg_sodium -RUN set -eux; \ - git clone --depth=1 -b $SODIUM --single-branch https://github.com/michelp/pgsodium.git /src/sodium; \ - cd /src/sodium; \ - make install; - -#Install pg_cron -RUN set -eux; \ - git clone --depth=1 -b $CRON --single-branch https://github.com/citusdata/pg_cron.git /src/cron; \ - cd /src/cron; \ - make install; - -#Intall pg_stat_monitor -RUN set -eux; \ - git clone --depth=1 -b $STAT --single-branch https://github.com/percona/pg_stat_monitor.git /src/stat; \ - cd /src/stat; \ - make USE_PGXS=1 install - -#Install PGTap -RUN set -eux; \ - git clone --depth=1 -b $TAP --single-branch https://github.com/theory/pgtap.git /src/tap; \ - cd /src/tap; \ - make install - -#Install safeupdate -RUN set -eux; \ - git clone --depth=1 -b $UPDATE --single-branch https://github.com/eradman/pg-safeupdate /src/update; \ - cd /src/update; \ - gmake install - -#Get postgres for entrypoint -RUN set -eux; \ - git clone https://github.com/docker-library/postgres /src/postgres; - -#Get supabase postgres repo for configs -RUN set -eux; \ - git clone https://github.com/supabase/postgres.git /src/supabase; \ - echo "# IPv6 external connections" >> /src/supabase/ansible/files/postgresql_config/pg_hba.conf.j2; \ - echo "host all all ::/0 scram-sha-256" >> /src/supabase/ansible/files/postgresql_config/pg_hba.conf.j2; \ - sed -i "s/shared_preload_libraries.*/shared_preload_libraries = 'pg_stat_statements, pg_stat_monitor, pgaudit, pg_cron, pg_net, pgsodium'/" /src/supabase/ansible/files/postgresql_config/postgresql.conf.j2; \ - echo "pgsodium.getkey_script = '/usr/share/postgresql/14/extension/pgsodium_getkey'" >> /src/supabase/ansible/files/postgresql_config/postgresql.conf.j2; \ - cp /src/supabase/ansible/files/pgsodium_getkey_urandom.sh.j2 /usr/share/postgresql/14/extension/pgsodium_getkey; \ - chmod +x /usr/share/postgresql/14/extension/pgsodium_getkey; \ - echo "CREATE SCHEMA IF NOT exists extensions; CREATE EXTENSION IF NOT EXISTS pg_stat_statements with schema extensions;" > /src/supabase/migrations/db/migrations/10000000000001_pg_stat_stagements.sql; \ - rm /src/supabase/migrations/db/migrations/10000000000000_demote-postgres.sql; \ - cp /src/supabase/ansible/files/pgbouncer_config/pgbouncer_auth_schema.sql /src/supabase/migrations/db/migrations/10000000000000_pgbouncer.sql; \ - rm /src/supabase/migrations/db/migrations/20220404205710_pg_graphql-on-by-default.sql; \ - rm /src/supabase/migrations/db/migrations/20220613123923_pg_graphql-pg-dump-perms.sql; \ - rm /src/supabase/migrations/db/migrations/20220317095840_pg_graphql.sql; - -FROM deb - -ENV PGDATA /var/lib/postgresql/data -ENV PATH /usr/lib/postgresql/14/bin:$PATH - -ENV LANGUAGE en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LC_ALL en_US.UTF-8 - -ARG POSTGRES=14.1.0.102 - -RUN set -eux; \ - MAJORVERSION=$(echo $POSTGRES | cut -d. -f1); \ - apt update; \ - apt-get install -y --no-install-recommends \ - postgresql-${MAJORVERSION} \ - postgresql-contrib-${MAJORVERSION} \ - bash \ - locales \ - libcurl4 \ - libevent-2. \ - libsodium23; \ - rm -rf /var/lib/apt/lists/*; \ - rm -rf /var/cache/apt/archives ; \ - rm -rf /usr/share/doc/; \ - rm -rf /usr/share/man/; \ - rm -rf /usr/share/locale/; \ - apt install -y --no-install-recommends --no-install-suggests \ - libelogind0; \ - mkdir -p /etc/postgresql-custom/; \ - chown -R postgres:postgres /etc/postgresql-custom/; \ - chmod 777 /etc/postgresql-custom/; \ - mkdir -p "$PGDATA"; \ - chown -R postgres:postgres "$PGDATA"; \ - chmod 777 "$PGDATA"; \ - mkdir -p /run/postgresql; \ - chmod 777 /run/postgresql; \ - echo "LC_ALL=en_US.UTF-8" >> /etc/environment; \ - echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ - echo "LANG=en_US.UTF-8" > /etc/locale.conf; \ - update-locale "en_US.UTF-8"; \ - locale-gen --purge "en_US.UTF-8"; \ - dpkg-reconfigure --frontend noninteractive locales - -COPY --from=go /go/bin/gosu /usr/bin/gosu -COPY --from=pgbase /usr/lib/postgresql/14/ /usr/lib/postgresql/14/ -COPY --from=pgbase /usr/share/postgresql/14/extension /usr/share/postgresql/14/extension -COPY --from=pgbase /src/postgres/docker-entrypoint.sh /docker-entrypoint.sh -COPY --from=pgbase /src/supabase/ansible/files/postgresql_config/postgresql.conf.j2 /etc/postgresql/postgresql.conf -COPY --from=pgbase /src/supabase/ansible/files/postgresql_config/pg_hba.conf.j2 /etc/postgresql/pg_hba.conf -COPY --from=pgbase /src/supabase/ansible/files/postgresql_config/pg_ident.conf.j2 /etc/postgresql/pg_ident.conf -COPY --from=pgbase /src/supabase/ansible/files/postgresql_config/postgresql-stdout-log.conf /etc/postgresql/logging.conf -COPY --from=pgbase /src/supabase/migrations/db/ /docker-entrypoint-initdb.d/ - -RUN \ - mkdir -p /docker-entrypoint-initdb.d; \ - chmod 777 /docker-entrypoint-initdb.d; \ - /usr/share/postgresql/14/extension/pgsodium_getkey; \ - echo $PATH - -VOLUME /var/lib/postgresql/data -STOPSIGNAL SIGINT -EXPOSE 5432 -ENTRYPOINT ["/docker-entrypoint.sh"] -CMD ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"] diff --git a/postgres/Dockerfile.gotpl b/postgres/Dockerfile.gotpl deleted file mode 100644 index 97b84df..0000000 --- a/postgres/Dockerfile.gotpl +++ /dev/null @@ -1,231 +0,0 @@ -FROM {{image "ghcr.io/greboid/dockerfiles/golang"}} as go -RUN go install github.com/tianon/gosu@latest - -FROM debian:stable-slim as deb - -RUN set -eux; \ - apt update; \ - apt install -y --no-install-recommends --no-install-suggests \ - gpg \ - lsb-release \ - ca-certificates \ - libsodium23 \ - curl; \ - curl -Ss http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/postgres.gpg; \ - echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list; \ - echo "Package: *" > /etc/apt/preferences.d/postgres.pref; \ - echo "Pin: release o=apt.postgresql.org" >> /etc/apt/preferences.d/postgres.pref; \ - echo "Pin-Priority: 500" >> /etc/apt/preferences.d/postgres.pref; \ - rm -rf /var/lib/apt/lists/*; \ - apt update; \ - apt upgrade -y; \ - apt install -y --no-install-recommends --no-install-suggests \ - libelogind0; \ - rm -rf /var/lib/apt/lists/*; \ - rm -rf /var/cache/apt/archives ; \ - rm -rf /usr/share/doc/; \ - rm -rf /usr/share/man/; \ - rm -rf /usr/share/locale/; - -FROM deb as pgbase - -#Get Various versions -ARG POSTGRES={{regex_url_content "supabase-postgres" "https://raw.githubusercontent.com/supabase/postgres/develop/common.vars.pkr.hcl" "\"(.*?)\""}} -ARG AUDIT={{github_tag "pgaudit/pgaudit"}} -ARG JWT=9742dab1b2f297ad3811120db7b21451bca2d3c9 -ARG HTTP={{github_tag "pramsey/pgsql-http"}} -ARG WALJSON=wal2json_2_5 -ARG NET={{github_tag "supabase/pg_net"}} -ARG HASHIDS={{github_tag "iCyberon/pg_hashids"}} -ARG SODIUM={{github_tag "michelp/pgsodium"}} -ARG CRON={{github_tag "citusdata/pg_cron"}} -ARG STAT={{github_tag "percona/pg_stat_monitor"}} -ARG TAP={{github_tag "theory/pgtap/"}} -ARG UPDATE={{github_tag "eradman/pg-safeupdate"}} - -#Install dependencies -RUN set -eux; \ - MAJORVERSION=$(echo $POSTGRES | cut -d. -f1); \ - apt update; \ - apt install -y --no-install-recommends --no-install-suggests \ - build-essential \ - git \ - libpq-dev \ - postgresql-server-dev-${MAJORVERSION} \ - postgresql-${MAJORVERSION} \ - libkrb5-dev \ - libsodium-dev \ - libcurl4-openssl-dev \ - libtool \ - automake \ - autoconf \ - pkgconf \ - libevent-dev \ - pandoc \ - libreadline-dev \ - bison \ - flex \ - libreadline8 \ - zlib1g \ - coreutils \ - zlib1g-dev; \ - rm -rf /var/lib/apt/lists/*; \ - rm -rf /var/cache/apt/archives ; \ - rm -rf /usr/share/doc/; \ - rm -rf /usr/share/man/; \ - rm -rf /usr/share/locale/; \ - git config --global advice.detachedHead false - -#Install pgaudit -RUN set -eux; \ - git clone --depth=1 -b $AUDIT --single-branch https://github.com/pgaudit/pgaudit.git /src/audit; \ - cd /src/audit; \ - make install USE_PGXS=1 PG_CONFIG=/usr/bin/pg_config; - -#Install pg_jwt -RUN set -eux; \ - git clone --depth=1 -b master --single-branch https://github.com/michelp/pgjwt /src/jwt; \ - cd /src/jwt; \ - git checkout $JWT; \ - make install; - -#Install pg_http -RUN set -eux; \ - git clone --depth=1 -b $HTTP --single-branch https://github.com/pramsey/pgsql-http.git /src/http; \ - cd /src/http; \ - make install; - -#Install wal2json -RUN set -eux; \ - git clone --depth=1 -b $WALJSON --single-branch https://github.com/eulerto/wal2json.git /src/wal2json; \ - cd /src/wal2json; \ - make install; - -#Install pg_net -RUN set -eux; \ - git clone --depth=1 -b $NET --single-branch https://github.com/supabase/pg_net.git /src/net; \ - cd /src/net; \ - make all; \ - make install; - -#Install pg_hashids -RUN set -eux; \ - git clone --depth=1 -b $HASHIDS --single-branch https://github.com/iCyberon/pg_hashids.git /src/hashids; \ - cd /src/hashids; \ - USE_PGXS=1 make install; - -#Install pg_sodium -RUN set -eux; \ - git clone --depth=1 -b $SODIUM --single-branch https://github.com/michelp/pgsodium.git /src/sodium; \ - cd /src/sodium; \ - make install; - -#Install pg_cron -RUN set -eux; \ - git clone --depth=1 -b $CRON --single-branch https://github.com/citusdata/pg_cron.git /src/cron; \ - cd /src/cron; \ - make install; - -#Intall pg_stat_monitor -RUN set -eux; \ - git clone --depth=1 -b $STAT --single-branch https://github.com/percona/pg_stat_monitor.git /src/stat; \ - cd /src/stat; \ - make USE_PGXS=1 install - -#Install PGTap -RUN set -eux; \ - git clone --depth=1 -b $TAP --single-branch https://github.com/theory/pgtap.git /src/tap; \ - cd /src/tap; \ - make install - -#Install safeupdate -RUN set -eux; \ - git clone --depth=1 -b $UPDATE --single-branch https://github.com/eradman/pg-safeupdate /src/update; \ - cd /src/update; \ - gmake install - -#Get postgres for entrypoint -RUN set -eux; \ - git clone https://github.com/docker-library/postgres /src/postgres; - -#Get supabase postgres repo for configs -RUN set -eux; \ - git clone https://github.com/supabase/postgres.git /src/supabase; \ - echo "# IPv6 external connections" >> /src/supabase/ansible/files/postgresql_config/pg_hba.conf.j2; \ - echo "host all all ::/0 scram-sha-256" >> /src/supabase/ansible/files/postgresql_config/pg_hba.conf.j2; \ - sed -i "s/shared_preload_libraries.*/shared_preload_libraries = 'pg_stat_statements, pg_stat_monitor, pgaudit, pg_cron, pg_net, pgsodium'/" /src/supabase/ansible/files/postgresql_config/postgresql.conf.j2; \ - echo "pgsodium.getkey_script = '/usr/share/postgresql/14/extension/pgsodium_getkey'" >> /src/supabase/ansible/files/postgresql_config/postgresql.conf.j2; \ - cp /src/supabase/ansible/files/pgsodium_getkey_urandom.sh.j2 /usr/share/postgresql/14/extension/pgsodium_getkey; \ - chmod +x /usr/share/postgresql/14/extension/pgsodium_getkey; \ - echo "CREATE SCHEMA IF NOT exists extensions; CREATE EXTENSION IF NOT EXISTS pg_stat_statements with schema extensions;" > /src/supabase/migrations/db/migrations/10000000000001_pg_stat_stagements.sql; \ - rm /src/supabase/migrations/db/migrations/10000000000000_demote-postgres.sql; \ - cp /src/supabase/ansible/files/pgbouncer_config/pgbouncer_auth_schema.sql /src/supabase/migrations/db/migrations/10000000000000_pgbouncer.sql; \ - rm /src/supabase/migrations/db/migrations/20220404205710_pg_graphql-on-by-default.sql; \ - rm /src/supabase/migrations/db/migrations/20220613123923_pg_graphql-pg-dump-perms.sql; \ - rm /src/supabase/migrations/db/migrations/20220317095840_pg_graphql.sql; - -FROM deb - -ENV PGDATA /var/lib/postgresql/data -ENV PATH /usr/lib/postgresql/14/bin:$PATH - -ENV LANGUAGE en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LC_ALL en_US.UTF-8 - -ARG POSTGRES={{regex_url_content "supabase-postgres" "https://raw.githubusercontent.com/supabase/postgres/develop/common.vars.pkr.hcl" "\"(.*?)\""}} - -RUN set -eux; \ - MAJORVERSION=$(echo $POSTGRES | cut -d. -f1); \ - apt update; \ - apt-get install -y --no-install-recommends \ - postgresql-${MAJORVERSION} \ - postgresql-contrib-${MAJORVERSION} \ - bash \ - locales \ - libcurl4 \ - libevent-2. \ - libsodium23; \ - rm -rf /var/lib/apt/lists/*; \ - rm -rf /var/cache/apt/archives ; \ - rm -rf /usr/share/doc/; \ - rm -rf /usr/share/man/; \ - rm -rf /usr/share/locale/; \ - apt install -y --no-install-recommends --no-install-suggests \ - libelogind0; \ - mkdir -p /etc/postgresql-custom/; \ - chown -R postgres:postgres /etc/postgresql-custom/; \ - chmod 777 /etc/postgresql-custom/; \ - mkdir -p "$PGDATA"; \ - chown -R postgres:postgres "$PGDATA"; \ - chmod 777 "$PGDATA"; \ - mkdir -p /run/postgresql; \ - chmod 777 /run/postgresql; \ - echo "LC_ALL=en_US.UTF-8" >> /etc/environment; \ - echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ - echo "LANG=en_US.UTF-8" > /etc/locale.conf; \ - update-locale "en_US.UTF-8"; \ - locale-gen --purge "en_US.UTF-8"; \ - dpkg-reconfigure --frontend noninteractive locales - -COPY --from=go /go/bin/gosu /usr/bin/gosu -COPY --from=pgbase /usr/lib/postgresql/14/ /usr/lib/postgresql/14/ -COPY --from=pgbase /usr/share/postgresql/14/extension /usr/share/postgresql/14/extension -COPY --from=pgbase /src/postgres/docker-entrypoint.sh /docker-entrypoint.sh -COPY --from=pgbase /src/supabase/ansible/files/postgresql_config/postgresql.conf.j2 /etc/postgresql/postgresql.conf -COPY --from=pgbase /src/supabase/ansible/files/postgresql_config/pg_hba.conf.j2 /etc/postgresql/pg_hba.conf -COPY --from=pgbase /src/supabase/ansible/files/postgresql_config/pg_ident.conf.j2 /etc/postgresql/pg_ident.conf -COPY --from=pgbase /src/supabase/ansible/files/postgresql_config/postgresql-stdout-log.conf /etc/postgresql/logging.conf -COPY --from=pgbase /src/supabase/migrations/db/ /docker-entrypoint-initdb.d/ - -RUN \ - mkdir -p /docker-entrypoint-initdb.d; \ - chmod 777 /docker-entrypoint-initdb.d; \ - /usr/share/postgresql/14/extension/pgsodium_getkey; \ - echo $PATH - -VOLUME /var/lib/postgresql/data -STOPSIGNAL SIGINT -EXPOSE 5432 -ENTRYPOINT ["/docker-entrypoint.sh"] -CMD ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"] diff --git a/postgres/IGNORE b/postgres/IGNORE deleted file mode 100644 index b593879..0000000 --- a/postgres/IGNORE +++ /dev/null @@ -1 +0,0 @@ -Needs fixing for 15 diff --git a/postgrest/Dockerfile b/postgrest/Dockerfile deleted file mode 100644 index 3c544d1..0000000 --- a/postgrest/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -# Generated from https://github.com/puzzad/containers/postgrest/Dockerfile.gotpl -# BOM: {"github:postgrest/postgrest":"v11.1.0","image:ghcr.io/greboid/dockerfiles/alpine":"bb09baaefa0022cb709bfb42e8852359b208eb2a6baa0beff38eaa3a610141a7"} - -FROM ghcr.io/greboid/dockerfiles/alpine@sha256:bb09baaefa0022cb709bfb42e8852359b208eb2a6baa0beff38eaa3a610141a7 as build - -ARG TAG=v11.1.0 - -RUN set -eux; \ - apk add xz; \ - wget https://github.com/PostgREST/postgrest/releases/download/$TAG/postgrest-$TAG-linux-static-x64.tar.xz; \ - tar xf postgrest-$TAG-linux-static-x64.tar.xz; - -FROM scratch -COPY --from=build /postgrest / -ENTRYPOINT ["/postgrest"] diff --git a/postgrest/Dockerfile.gotpl b/postgrest/Dockerfile.gotpl deleted file mode 100644 index 5980808..0000000 --- a/postgrest/Dockerfile.gotpl +++ /dev/null @@ -1,12 +0,0 @@ -FROM {{image "ghcr.io/greboid/dockerfiles/alpine"}} as build - -ARG TAG={{github_tag "postgrest/postgrest"}} - -RUN set -eux; \ - apk add xz; \ - wget https://github.com/PostgREST/postgrest/releases/download/$TAG/postgrest-$TAG-linux-static-x64.tar.xz; \ - tar xf postgrest-$TAG-linux-static-x64.tar.xz; - -FROM scratch -COPY --from=build /postgrest / -ENTRYPOINT ["/postgrest"] diff --git a/realtime/Dockerfile b/realtime/Dockerfile deleted file mode 100644 index 4ca4f8a..0000000 --- a/realtime/Dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -# Generated from https://github.com/puzzad/containers/realtime/Dockerfile.gotpl -# BOM: {"image:ghcr.io/greboid/dockerfiles/alpine":"bb09baaefa0022cb709bfb42e8852359b208eb2a6baa0beff38eaa3a610141a7"} - -FROM ghcr.io/greboid/dockerfiles/alpine@sha256:bb09baaefa0022cb709bfb42e8852359b208eb2a6baa0beff38eaa3a610141a7 as build - -ARG TAG=v1.0.0 - -ENV MIX_ENV=prod \ - DB_SSL=false - -RUN set -eux; \ - apk add elixir git; \ - mix local.hex --force && mix local.rebar --force; \ - git -c advice.detachedHead=false clone --depth=1 -b $TAG --single-branch https://github.com/supabase/realtime.git /app; \ - cd /app; -RUN set -eux; \ - cd /app/server; \ - ls; \ - mix deps.get; \ - mix deps.compile; \ - mix release - -FROM ghcr.io/greboid/dockerfiles/alpine@sha256:bb09baaefa0022cb709bfb42e8852359b208eb2a6baa0beff38eaa3a610141a7 - -RUN apk add openssl bash libstdc++ libgcc -WORKDIR /app -COPY --from=build /app/server/_build /app -COPY --from=build /app/docker-entrypoint.sh /app/docker-entrypoint.sh -ENTRYPOINT ["/app/docker-entrypoint.sh"] -CMD ["/app/prod/rel/realtime/bin/realtime", "start"] diff --git a/realtime/Dockerfile.gotpl b/realtime/Dockerfile.gotpl deleted file mode 100644 index 8db0923..0000000 --- a/realtime/Dockerfile.gotpl +++ /dev/null @@ -1,27 +0,0 @@ -FROM {{image "ghcr.io/greboid/dockerfiles/alpine"}} as build - -ARG TAG=v1.0.0 - -ENV MIX_ENV=prod \ - DB_SSL=false - -RUN set -eux; \ - apk add elixir git; \ - mix local.hex --force && mix local.rebar --force; \ - git -c advice.detachedHead=false clone --depth=1 -b $TAG --single-branch https://github.com/supabase/realtime.git /app; \ - cd /app; -RUN set -eux; \ - cd /app/server; \ - ls; \ - mix deps.get; \ - mix deps.compile; \ - mix release - -FROM {{image "ghcr.io/greboid/dockerfiles/alpine"}} - -RUN apk add openssl bash libstdc++ libgcc -WORKDIR /app -COPY --from=build /app/server/_build /app -COPY --from=build /app/docker-entrypoint.sh /app/docker-entrypoint.sh -ENTRYPOINT ["/app/docker-entrypoint.sh"] -CMD ["/app/prod/rel/realtime/bin/realtime", "start"] diff --git a/redis/Dockerfile b/redis/Dockerfile deleted file mode 100644 index 28af4a6..0000000 --- a/redis/Dockerfile +++ /dev/null @@ -1,80 +0,0 @@ -# Generated from https://github.com/puzzad/containers/redis/Dockerfile.gotpl -# BOM: {"apk:binutils":"2.40-r7","apk:brotli-libs":"1.0.9-r14","apk:build-base":"0.5-r3","apk:busybox":"1.36.1-r2","apk:busybox-binsh":"1.36.1-r2","apk:ca-certificates":"20230506-r0","apk:file":"5.45-r0","apk:fortify-headers":"1.1-r3","apk:g++":"12.2.1_git20220924-r10","apk:gcc":"12.2.1_git20220924-r10","apk:git":"2.40.1-r0","apk:gmp":"6.2.1-r3","apk:isl25":"0.25-r2","apk:libatomic":"12.2.1_git20220924-r10","apk:libc-dev":"0.7.2-r5","apk:libcrypto3":"3.1.1-r3","apk:libcurl":"8.2.1-r0","apk:libexpat":"2.5.0-r1","apk:libgcc":"12.2.1_git20220924-r10","apk:libgomp":"12.2.1_git20220924-r10","apk:libidn2":"2.3.4-r1","apk:libmagic":"5.45-r0","apk:libpcre16":"8.45-r3","apk:libpcre32":"8.45-r3","apk:libpcrecpp":"8.45-r3","apk:libssl3":"3.1.1-r3","apk:libstdc++":"12.2.1_git20220924-r10","apk:libstdc++-dev":"12.2.1_git20220924-r10","apk:libunistring":"1.1-r1","apk:linux-headers":"6.3-r0","apk:make":"4.4.1-r1","apk:mpc1":"1.3.1-r1","apk:mpfr4":"4.2.0_p12-r0","apk:musl":"1.2.4-r1","apk:musl-dev":"1.2.4-r1","apk:nghttp2-libs":"1.55.1-r0","apk:openssl-dev":"3.1.1-r3","apk:openssl-libs-static":"3.1.1-r3","apk:patch":"2.7.6-r10","apk:pcre":"8.45-r3","apk:pcre-dev":"8.45-r3","apk:pcre2":"10.42-r1","apk:pkgconf":"1.9.5-r0","apk:tzdata":"2023c-r1","apk:zlib":"1.2.13-r1","apk:zlib-dev":"1.2.13-r1","apk:zlib-static":"1.2.13-r1","apk:zstd-libs":"1.5.5-r4","github:redis/redis":"7.0.12","image:ghcr.io/greboid/dockerfiles/alpine":"bb09baaefa0022cb709bfb42e8852359b208eb2a6baa0beff38eaa3a610141a7"} - -FROM ghcr.io/greboid/dockerfiles/alpine@sha256:bb09baaefa0022cb709bfb42e8852359b208eb2a6baa0beff38eaa3a610141a7 AS build - -ARG TAG="7.0.12" - -ENV LDFLAGS="-static" - -COPY redis.conf /redis.conf - -RUN set -eux; \ - apk add --no-cache --virtual .build-deps \ - binutils=2.40-r7 \ - brotli-libs=1.0.9-r14 \ - build-base=0.5-r3 \ - busybox=1.36.1-r2 \ - busybox-binsh=1.36.1-r2 \ - ca-certificates=20230506-r0 \ - file=5.45-r0 \ - fortify-headers=1.1-r3 \ - g++=12.2.1_git20220924-r10 \ - gcc=12.2.1_git20220924-r10 \ - git=2.40.1-r0 \ - gmp=6.2.1-r3 \ - isl25=0.25-r2 \ - libatomic=12.2.1_git20220924-r10 \ - libc-dev=0.7.2-r5 \ - libcrypto3=3.1.1-r3 \ - libcurl=8.2.1-r0 \ - libexpat=2.5.0-r1 \ - libgcc=12.2.1_git20220924-r10 \ - libgomp=12.2.1_git20220924-r10 \ - libidn2=2.3.4-r1 \ - libmagic=5.45-r0 \ - libpcre16=8.45-r3 \ - libpcre32=8.45-r3 \ - libpcrecpp=8.45-r3 \ - libssl3=3.1.1-r3 \ - libstdc++=12.2.1_git20220924-r10 \ - libstdc++-dev=12.2.1_git20220924-r10 \ - libunistring=1.1-r1 \ - linux-headers=6.3-r0 \ - make=4.4.1-r1 \ - mpc1=1.3.1-r1 \ - mpfr4=4.2.0_p12-r0 \ - musl=1.2.4-r1 \ - musl-dev=1.2.4-r1 \ - nghttp2-libs=1.55.1-r0 \ - openssl-dev=3.1.1-r3 \ - openssl-libs-static=3.1.1-r3 \ - patch=2.7.6-r10 \ - pcre=8.45-r3 \ - pcre-dev=8.45-r3 \ - pcre2=10.42-r1 \ - pkgconf=1.9.5-r0 \ - tzdata=2023c-r1 \ - zlib=1.2.13-r1 \ - zlib-dev=1.2.13-r1 \ - zlib-static=1.2.13-r1 \ - zstd-libs=1.5.5-r4 \ - ; \ - git -c advice.detachedHead=false clone --depth=1 -b $TAG --single-branch https://github.com/redis/redis /src/redis; \ - cd /src/redis; \ - make distclean; \ - make; \ - mkdir /data; \ - strip /src/redis/src/redis-server; - -FROM ghcr.io/greboid/dockerfiles/alpine@sha256:bb09baaefa0022cb709bfb42e8852359b208eb2a6baa0beff38eaa3a610141a7 - -COPY --from=build --chown=65532:65532 /redis.conf /home/nonroot/redis.conf -COPY --from=build --chown=65532:65532 /data /home/nonroot/database -COPY --from=build --chown=65532:65532 /src/redis/src/redis-server /home/nonroot/redis - -ENTRYPOINT ["/home/nonroot/redis"] - -EXPOSE 6379 -VOLUME "/home/nonroot/database" -CMD ["/home/nonroot/redis.conf"] diff --git a/redis/Dockerfile.gotpl b/redis/Dockerfile.gotpl deleted file mode 100644 index 5c39020..0000000 --- a/redis/Dockerfile.gotpl +++ /dev/null @@ -1,31 +0,0 @@ -FROM {{image "ghcr.io/greboid/dockerfiles/alpine"}} AS build - -ARG TAG="{{github_tag "redis/redis"}}" - -ENV LDFLAGS="-static" - -COPY redis.conf /redis.conf - -RUN set -eux; \ - apk add --no-cache --virtual .build-deps \ - {{range $key, $value := alpine_packages "git" "build-base" "tzdata" "ca-certificates" "linux-headers" "pcre-dev" "musl-dev" "openssl-dev" "openssl-libs-static" "zlib-dev" "zlib-static" -}} - {{$key}}={{$value}} \ - {{end}}; \ - git -c advice.detachedHead=false clone --depth=1 -b $TAG --single-branch https://github.com/redis/redis /src/redis; \ - cd /src/redis; \ - make distclean; \ - make; \ - mkdir /data; \ - strip /src/redis/src/redis-server; - -FROM {{image "ghcr.io/greboid/dockerfiles/alpine"}} - -COPY --from=build --chown=65532:65532 /redis.conf /home/nonroot/redis.conf -COPY --from=build --chown=65532:65532 /data /home/nonroot/database -COPY --from=build --chown=65532:65532 /src/redis/src/redis-server /home/nonroot/redis - -ENTRYPOINT ["/home/nonroot/redis"] - -EXPOSE 6379 -VOLUME "/home/nonroot/database" -CMD ["/home/nonroot/redis.conf"] diff --git a/redis/redis.conf b/redis/redis.conf deleted file mode 100755 index 68f20d7..0000000 --- a/redis/redis.conf +++ /dev/null @@ -1,6 +0,0 @@ -bind 0.0.0.0 -protected-mode no - -dir /home/nonroot/database - -port 6379 diff --git a/rust/Dockerfile b/rust/Dockerfile deleted file mode 100644 index cae7622..0000000 --- a/rust/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -# Generated from https://github.com/puzzad/containers/rust/Dockerfile.gotpl -# BOM: {"github:rust-lang/rust":"1.65.0"} - -FROM debian:stable-slim - -ARG TAG1.65.0 - -ENV RUSTUP_HOME=/opt/rust -ENV CARGO_HOME=/opt/rust -ENV PATH=/opt/rust/bin:$PATH - -RUN set -eux; \ - apt update; \ - apt install -y --no-install-recommends --no-install-suggests \ - gpg \ - lsb-release \ - ca-certificates \ - libsodium23 \ - curl; \ - curl -Ss https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init -o rustup-init; \ - chmod +x rustup-init; \ - ./rustup-init -y --default-toolchain stable --profile minimal --no-modify-path; \ - rm -rf /var/lib/apt/lists/*; \ diff --git a/storage/Dockerfile b/storage/Dockerfile deleted file mode 100644 index 9e0dde4..0000000 --- a/storage/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -# Generated from https://github.com/puzzad/containers/storage/Dockerfile.gotpl -# BOM: {"image:ghcr.io/greboid/dockerfiles/alpine":"bb09baaefa0022cb709bfb42e8852359b208eb2a6baa0beff38eaa3a610141a7"} - -FROM ghcr.io/greboid/dockerfiles/alpine@sha256:bb09baaefa0022cb709bfb42e8852359b208eb2a6baa0beff38eaa3a610141a7 as npm - -RUN set -eux; \ - apk add npm git python3 g++ make; - -FROM npm as checkout - -# v0.35.0 onwards has a breaking API change... -ARG TAG=v0.34.0 - -RUN set -eux; \ - git -c advice.detachedHead=false clone --depth=1 -b $TAG --single-branch https://github.com/supabase/storage-api.git /app; - -FROM npm as deps - -COPY --from=checkout /app/package.json /app/package.json -COPY --from=checkout /app/package-lock.json /app/package-lock.json - -RUN set -eux; \ - apk add g++ make python3 git; \ - cd /app; \ - npm ci --omit=dev; - -FROM npm as app - -COPY --from=checkout /app /app -RUN set -eux; \ - cd /app; \ - npm ci; \ - npm run build; - -FROM ghcr.io/greboid/dockerfiles/alpine@sha256:bb09baaefa0022cb709bfb42e8852359b208eb2a6baa0beff38eaa3a610141a7 - -COPY --from=checkout /app/migrations /migrations -COPY --from=checkout /app/ecosystem.config.js /ecosystem.config.js -COPY --from=checkout /app/docker-entrypoint.sh /docker-entrypoint.sh -COPY --from=deps /app/node_modules /node_modules -COPY --from=app /app/dist /dist - -RUN set -eux; \ - apk add bash npm; \ - npm install -g pm2 - -ENTRYPOINT ["/docker-entrypoint.sh"] -CMD ["pm2-runtime", "/ecosystem.config.js"] diff --git a/storage/Dockerfile.gotpl b/storage/Dockerfile.gotpl deleted file mode 100644 index fb45409..0000000 --- a/storage/Dockerfile.gotpl +++ /dev/null @@ -1,45 +0,0 @@ -FROM {{image "ghcr.io/greboid/dockerfiles/alpine"}} as npm - -RUN set -eux; \ - apk add npm git python3 g++ make; - -FROM npm as checkout - -# v0.35.0 onwards has a breaking API change... -ARG TAG=v0.34.0 - -RUN set -eux; \ - git -c advice.detachedHead=false clone --depth=1 -b $TAG --single-branch https://github.com/supabase/storage-api.git /app; - -FROM npm as deps - -COPY --from=checkout /app/package.json /app/package.json -COPY --from=checkout /app/package-lock.json /app/package-lock.json - -RUN set -eux; \ - apk add g++ make python3 git; \ - cd /app; \ - npm ci --omit=dev; - -FROM npm as app - -COPY --from=checkout /app /app -RUN set -eux; \ - cd /app; \ - npm ci; \ - npm run build; - -FROM {{image "ghcr.io/greboid/dockerfiles/alpine"}} - -COPY --from=checkout /app/migrations /migrations -COPY --from=checkout /app/ecosystem.config.js /ecosystem.config.js -COPY --from=checkout /app/docker-entrypoint.sh /docker-entrypoint.sh -COPY --from=deps /app/node_modules /node_modules -COPY --from=app /app/dist /dist - -RUN set -eux; \ - apk add bash npm; \ - npm install -g pm2 - -ENTRYPOINT ["/docker-entrypoint.sh"] -CMD ["pm2-runtime", "/ecosystem.config.js"]