From b1f5c23a6ffb11572a0b141f6aa93cbebc6c8a4a Mon Sep 17 00:00:00 2001 From: Jared Rhizor Date: Tue, 2 Nov 2021 09:45:54 -0700 Subject: [PATCH] use ADD to reduce docker image sizes (#7537) * use ADD to reduce docker image sizes * switch to full paths --- .bumpversion.cfg | 6 ++++++ airbyte-scheduler/app/Dockerfile | 6 ++---- airbyte-server/Dockerfile | 6 ++---- airbyte-workers/Dockerfile | 8 +++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 268c4c2cba69..ebf0c22c63ae 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -10,6 +10,12 @@ serialize = [bumpversion:file:.env] +[bumpversion:file:airbyte-server/Dockerfile] + +[bumpversion:file:airbyte-workers/Dockerfile] + +[bumpversion:file:airbyte-scheduler/app/Dockerfile] + [bumpversion:file:airbyte-webapp/package.json] [bumpversion:file:airbyte-webapp/package-lock.json] diff --git a/airbyte-scheduler/app/Dockerfile b/airbyte-scheduler/app/Dockerfile index 8984019c79a1..26eee4e99bc4 100644 --- a/airbyte-scheduler/app/Dockerfile +++ b/airbyte-scheduler/app/Dockerfile @@ -5,9 +5,7 @@ ENV APPLICATION airbyte-scheduler WORKDIR /app -COPY build/distributions/${APPLICATION}-0*.tar ${APPLICATION}.tar - -RUN tar xf ${APPLICATION}.tar --strip-components=1 +ADD build/distributions/${APPLICATION}-0.30.23-alpha.tar /app # wait for upstream dependencies to become available before starting server -ENTRYPOINT ["/bin/bash", "-c", "bin/${APPLICATION}"] +ENTRYPOINT ["/bin/bash", "-c", "${APPLICATION}-0.30.23-alpha/bin/${APPLICATION}"] diff --git a/airbyte-server/Dockerfile b/airbyte-server/Dockerfile index 57d0dbd262cb..4c56d3784498 100644 --- a/airbyte-server/Dockerfile +++ b/airbyte-server/Dockerfile @@ -7,9 +7,7 @@ ENV APPLICATION airbyte-server WORKDIR /app -COPY build/distributions/${APPLICATION}-0*.tar ${APPLICATION}.tar - -RUN tar xf ${APPLICATION}.tar --strip-components=1 +ADD build/distributions/${APPLICATION}-0.30.23-alpha.tar /app # wait for upstream dependencies to become available before starting server -ENTRYPOINT ["/bin/bash", "-c", "bin/${APPLICATION}"] +ENTRYPOINT ["/bin/bash", "-c", "${APPLICATION}-0.30.23-alpha/bin/${APPLICATION}"] diff --git a/airbyte-workers/Dockerfile b/airbyte-workers/Dockerfile index 513bfc194030..397393b3d885 100644 --- a/airbyte-workers/Dockerfile +++ b/airbyte-workers/Dockerfile @@ -27,10 +27,8 @@ RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.17.14/ RUN chmod +x ./kubectl RUN mv ./kubectl /usr/local/bin -# Move and run worker -COPY build/distributions/${APPLICATION}*.tar ${APPLICATION}.tar - -RUN tar xf ${APPLICATION}.tar --strip-components=1 +# Move worker app +ADD build/distributions/${APPLICATION}-0.30.23-alpha.tar /app # wait for upstream dependencies to become available before starting server -ENTRYPOINT ["/bin/bash", "-c", "bin/${APPLICATION}"] +ENTRYPOINT ["/bin/bash", "-c", "${APPLICATION}-0.30.23-alpha/bin/${APPLICATION}"]