diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6d68b30a28..631f21fdb2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -159,6 +159,7 @@ jobs: context: . file: ${{ matrix.connector }}/Dockerfile load: true + build-args: BASE_IMAGE=ghcr.io/estuary/base-image:${{ steps.prep.outputs.tag }} tags: ghcr.io/estuary/${{ matrix.connector }}:local secrets: | "rockset_api_key=${{ secrets.ROCKSET_API_KEY }}" @@ -216,6 +217,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . + build-args: BASE_IMAGE=ghcr.io/estuary/base-image:${{ steps.prep.outputs.tag }} file: ${{ matrix.connector }}/Dockerfile push: true tags: ghcr.io/estuary/${{ matrix.connector }}:${{ steps.prep.outputs.tag }} diff --git a/materialize-bigquery/Dockerfile b/materialize-bigquery/Dockerfile index 307e847a45..bd6a703d97 100644 --- a/materialize-bigquery/Dockerfile +++ b/materialize-bigquery/Dockerfile @@ -1,3 +1,5 @@ +ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1 + # Build Stage ################################################################################ FROM golang:1.17-bullseye as builder @@ -23,7 +25,7 @@ RUN go build -tags nozstd -v -o ./connector ./materialize-bigquery/... # Runtime Stage ################################################################################ -FROM ghcr.io/estuary/base-image:v1 +FROM ${BASE_IMAGE} RUN apt-get update -y \ && apt-get install --no-install-recommends -y ca-certificates \ diff --git a/materialize-elasticsearch/Dockerfile b/materialize-elasticsearch/Dockerfile index 8ce9b5bd37..0d3d00cca4 100644 --- a/materialize-elasticsearch/Dockerfile +++ b/materialize-elasticsearch/Dockerfile @@ -1,3 +1,5 @@ +ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1 + # Build Stage ################################################################################ FROM --platform=linux/amd64 golang:1.17-bullseye as builder @@ -25,7 +27,7 @@ RUN go build -tags nozstd -v -o ./connector ./materialize-elasticsearch # Runtime Stage ################################################################################ -FROM ghcr.io/estuary/base-image:v1 +FROM ${BASE_IMAGE} WORKDIR /connector ENV PATH="/connector:$PATH" diff --git a/materialize-firebolt/Dockerfile b/materialize-firebolt/Dockerfile index 9400da1a09..7aaa24adcc 100644 --- a/materialize-firebolt/Dockerfile +++ b/materialize-firebolt/Dockerfile @@ -1,3 +1,5 @@ +ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1 + # Build Stage ################################################################################ FROM --platform=linux/amd64 golang:1.17-bullseye as builder @@ -24,7 +26,7 @@ RUN go build -tags nozstd -v -o ./connector ./materialize-firebolt # Runtime Stage ################################################################################ -FROM ghcr.io/estuary/base-image:v1 +FROM ${BASE_IMAGE} WORKDIR /connector ENV PATH="/connector:$PATH" diff --git a/materialize-google-sheets/Dockerfile b/materialize-google-sheets/Dockerfile index 6f7abf566e..89a3def680 100644 --- a/materialize-google-sheets/Dockerfile +++ b/materialize-google-sheets/Dockerfile @@ -1,3 +1,5 @@ +ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1 + # Build Stage ################################################################################ FROM golang:1.17-bullseye as builder @@ -24,7 +26,7 @@ RUN go build -tags nozstd -v -o ./connector ./materialize-google-sheets # Runtime Stage ################################################################################ -FROM ghcr.io/estuary/base-image:v1 +FROM ${BASE_IMAGE} WORKDIR /connector ENV PATH="/connector:$PATH" diff --git a/materialize-postgres/Dockerfile b/materialize-postgres/Dockerfile index ef80f6840c..daa25430dd 100644 --- a/materialize-postgres/Dockerfile +++ b/materialize-postgres/Dockerfile @@ -1,3 +1,5 @@ +ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1 + # Build Stage ################################################################################ FROM --platform=linux/amd64 golang:1.17-bullseye as builder @@ -23,7 +25,7 @@ RUN go build -tags nozstd -v -o ./connector ./materialize-postgres/... # Runtime Stage ################################################################################ -FROM ghcr.io/estuary/base-image:v1 +FROM ${BASE_IMAGE} WORKDIR /connector ENV PATH="/connector:$PATH" diff --git a/materialize-rockset/Dockerfile b/materialize-rockset/Dockerfile index 6f3b1a2fd5..e78f9cf9b2 100644 --- a/materialize-rockset/Dockerfile +++ b/materialize-rockset/Dockerfile @@ -1,3 +1,5 @@ +ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1 + # Build Stage ################################################################################ FROM golang:1.17-bullseye as builder @@ -29,7 +31,7 @@ RUN go build -tags nozstd -v -o ./connector ./materialize-rockset/cmd/connector/ # Runtime Stage ################################################################################ -FROM ghcr.io/estuary/base-image:v1 +FROM ${BASE_IMAGE} WORKDIR /connector ENV PATH="/connector:$PATH" diff --git a/materialize-s3-parquet/Dockerfile b/materialize-s3-parquet/Dockerfile index 68ba64d719..1cd98d14fd 100644 --- a/materialize-s3-parquet/Dockerfile +++ b/materialize-s3-parquet/Dockerfile @@ -1,3 +1,5 @@ +ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1 + # Build Stage ################################################################################ FROM golang:1.17-bullseye as builder @@ -23,7 +25,7 @@ RUN go build -tags nozstd -v -o ./connector ./materialize-s3-parquet # Runtime Stage ################################################################################ -FROM ghcr.io/estuary/base-image:v1 +FROM ${BASE_IMAGE} WORKDIR /connector ENV PATH="/connector:$PATH" diff --git a/materialize-snowflake/Dockerfile b/materialize-snowflake/Dockerfile index d657a71676..9c9f05a47d 100644 --- a/materialize-snowflake/Dockerfile +++ b/materialize-snowflake/Dockerfile @@ -1,3 +1,5 @@ +ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1 + # Build Stage ################################################################################ FROM golang:1.17-bullseye as builder @@ -23,7 +25,7 @@ RUN go build -tags nozstd -v -o ./connector ./materialize-snowflake/... # Runtime Stage ################################################################################ -FROM ghcr.io/estuary/base-image:v1 +FROM ${BASE_IMAGE} RUN apt-get update -y \ && apt-get install --no-install-recommends -y \ diff --git a/materialize-webhook/Dockerfile b/materialize-webhook/Dockerfile index a7618be7df..cb503e1373 100644 --- a/materialize-webhook/Dockerfile +++ b/materialize-webhook/Dockerfile @@ -1,3 +1,5 @@ +ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1 + # Build Stage ################################################################################ FROM golang:1.17-bullseye as builder @@ -23,7 +25,7 @@ RUN go build -tags nozstd -v -o ./connector ./materialize-webhook/... # Runtime Stage ################################################################################ -FROM ghcr.io/estuary/base-image:v1 +FROM ${BASE_IMAGE} WORKDIR /connector ENV PATH="/connector:$PATH" diff --git a/source-gcs/Dockerfile b/source-gcs/Dockerfile index 069f8e1b21..10c71a42ec 100644 --- a/source-gcs/Dockerfile +++ b/source-gcs/Dockerfile @@ -1,3 +1,5 @@ +ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1 + # Build Stage ################################################################################ FROM golang:1.17-buster as builder @@ -23,7 +25,7 @@ RUN go build -o ./connector -v ./source-gcs/... # Runtime Stage ################################################################################ -FROM ghcr.io/estuary/base-image:v1 +FROM ${BASE_IMAGE} WORKDIR /connector ENV PATH="/connector:$PATH" diff --git a/source-hello-world/Dockerfile b/source-hello-world/Dockerfile index 84903ac3cd..8f89dee6f5 100644 --- a/source-hello-world/Dockerfile +++ b/source-hello-world/Dockerfile @@ -1,3 +1,5 @@ +ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1 + # Build Stage ################################################################################ FROM golang:1.17-buster as builder @@ -21,7 +23,7 @@ RUN go build -o ./connector -v ./source-hello-world/... # Runtime Stage ################################################################################ -FROM ghcr.io/estuary/base-image:v1 +FROM ${BASE_IMAGE} WORKDIR /connector ENV PATH="/connector:$PATH" diff --git a/source-http-file/Dockerfile b/source-http-file/Dockerfile index 6166cf322d..3b7482c39a 100644 --- a/source-http-file/Dockerfile +++ b/source-http-file/Dockerfile @@ -1,3 +1,5 @@ +ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1 + # Build Stage ################################################################################ FROM golang:1.17-buster as builder @@ -23,7 +25,7 @@ RUN go build -o ./connector -v ./source-http-file/... # Runtime Stage ################################################################################ -FROM ghcr.io/estuary/base-image:v1 +FROM ${BASE_IMAGE} WORKDIR /connector ENV PATH="/connector:$PATH" diff --git a/source-kafka/Dockerfile b/source-kafka/Dockerfile index cca60ad116..372717879b 100644 --- a/source-kafka/Dockerfile +++ b/source-kafka/Dockerfile @@ -1,3 +1,5 @@ +ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1 + # Build Stage ################################################################################ FROM rust:1.54-slim-buster as builder @@ -33,7 +35,7 @@ RUN touch src/main.rs \ # Runtime Stage ################################################################################ -FROM ghcr.io/estuary/base-image:v1 +FROM ${BASE_IMAGE} WORKDIR /connector ENV PATH="/connector:$PATH" diff --git a/source-kinesis/Dockerfile b/source-kinesis/Dockerfile index cb6349ec20..f3395adbaa 100644 --- a/source-kinesis/Dockerfile +++ b/source-kinesis/Dockerfile @@ -1,3 +1,5 @@ +ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1 + # Build Stage ################################################################################ FROM golang:1.17-buster as builder @@ -22,7 +24,7 @@ RUN go build -o ./connector -v ./source-kinesis/... # Runtime Stage ################################################################################ -FROM ghcr.io/estuary/base-image:v1 +FROM ${BASE_IMAGE} WORKDIR /connector ENV PATH="/connector:$PATH" diff --git a/source-mysql/Dockerfile b/source-mysql/Dockerfile index 5299197e4d..cbce220495 100644 --- a/source-mysql/Dockerfile +++ b/source-mysql/Dockerfile @@ -1,3 +1,5 @@ +ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1 + # Build Stage ################################################################################ FROM golang:1.17-buster as builder @@ -23,7 +25,7 @@ RUN go build -o ./connector -v ./source-mysql/... # Runtime Stage ################################################################################ -FROM ghcr.io/estuary/base-image:v1 +FROM ${BASE_IMAGE} WORKDIR /connector ENV PATH="/connector:$PATH" diff --git a/source-postgres/Dockerfile b/source-postgres/Dockerfile index 940e26f41f..c980bc6eeb 100644 --- a/source-postgres/Dockerfile +++ b/source-postgres/Dockerfile @@ -1,3 +1,5 @@ +ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1 + # Build Stage ################################################################################ FROM golang:1.17-buster as builder @@ -24,7 +26,7 @@ RUN go build -o ./connector -v ./source-postgres/... # Runtime Stage ################################################################################ -FROM ghcr.io/estuary/base-image:v1 +FROM ${BASE_IMAGE} WORKDIR /connector ENV PATH="/connector:$PATH" diff --git a/source-s3/Dockerfile b/source-s3/Dockerfile index e8036ab676..4ba792f0ff 100644 --- a/source-s3/Dockerfile +++ b/source-s3/Dockerfile @@ -1,3 +1,5 @@ +ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1 + # Build Stage ################################################################################ FROM golang:1.17-buster as builder @@ -24,7 +26,7 @@ RUN go build -o ./connector -v ./source-s3/... # Runtime Stage ################################################################################ -FROM ghcr.io/estuary/base-image:v1 +FROM ${BASE_IMAGE} WORKDIR /connector ENV PATH="/connector:$PATH" diff --git a/source-test/Dockerfile b/source-test/Dockerfile index 62092a9d61..49eb9a601e 100644 --- a/source-test/Dockerfile +++ b/source-test/Dockerfile @@ -1,3 +1,5 @@ +ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1 + # Build Stage ################################################################################ FROM golang:1.17-buster as builder @@ -21,7 +23,7 @@ RUN go build -o ./connector -v ./source-test/... # Runtime Stage ################################################################################ -FROM ghcr.io/estuary/base-image:v1 +FROM ${BASE_IMAGE} WORKDIR /connector ENV PATH="/connector:$PATH"