Skip to content

Commit

Permalink
Realign dockerfile that diverged (#16290)
Browse files Browse the repository at this point in the history
* Realign dockerfile that diverged
* Fix image label

Co-authored-by: Davin Chia <davinchia@gmail.com>
  • Loading branch information
gosusnp and davinchia committed Sep 7, 2022
1 parent a686508 commit fd66f1f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
30 changes: 15 additions & 15 deletions airbyte-container-orchestrator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
ARG JDK_VERSION=19-slim-bullseye
ARG JDK_IMAGE=openjdk:${JDK_VERSION}
FROM ${JDK_IMAGE} AS sync-attempt
FROM ${JDK_IMAGE} AS orchestrator

ARG DOCKER_BUILD_ARCH=amd64

# Install Docker to launch orchestrator images. Eventually should be replaced with Docker-java.
# Install Docker to launch worker images. Eventually should be replaced with Docker-java.
# See https://gitter.im/docker-java/docker-java?at=5f3eb87ba8c1780176603f4e for more information on why we are not currently using Docker-java
# See https://docs.docker.com/engine/install/debian/ to understand what the following commands are
# doing.
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
# arch var used to detect architecture of container. Architecture should be spcified to get proper binaries from repo.
RUN arch=$(dpkg --print-architecture) && \
add-apt-repository \
"deb [arch=${arch}] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable"
wget \
gnupg \
lsb-release
RUN mkdir -p /etc/apt/keyrings && \
wget -O - https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
RUN apt-get update && apt-get install -y docker-ce-cli jq

# Install kubectl for copying files to kube pods. Eventually should be replaced with a kube java client.
# See https://github.com/airbytehq/airbyte/issues/8643 for more information on why we are using kubectl for copying.
# The following commands were taken from https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#install-using-native-package-management
RUN curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
RUN echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y kubectl
RUN wget -O /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg && \
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list
RUN apt-get update && apt-get install -y kubectl

# Don't change this manually. Bump version expects to make moves based on this string
ARG VERSION=0.40.4
Expand Down
15 changes: 8 additions & 7 deletions airbyte-workers/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@ RUN apt-get update && apt-get install -y \
wget \
gnupg \
lsb-release
RUN mkdir -p /etc/apt/keyrings
RUN wget -O - https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
RUN echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
RUN mkdir -p /etc/apt/keyrings && \
wget -O - https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
RUN apt-get update && apt-get install -y docker-ce-cli jq

# Install kubectl for copying files to kube pods. Eventually should be replaced with a kube java client.
# See https://github.com/airbytehq/airbyte/issues/8643 for more information on why we are using kubectl for copying.
# The following commands were taken from https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#install-using-native-package-management
RUN wget -O /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
RUN echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list
RUN wget -O /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg && \
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list
RUN apt-get update && apt-get install -y kubectl

# Don't change this manually. Bump version expects to make moves based on this string
ARG VERSION=0.40.4

ENV APPLICATION airbyte-workers
Expand Down

0 comments on commit fd66f1f

Please sign in to comment.