- See this doc for details: https://github.com/airbytehq/airbyte/blob/master/docs/contributing-to-airbyte/developing-locally.md - Unit test does not work yet.
37 lines
1.3 KiB
Docker
37 lines
1.3 KiB
Docker
ARG JDK_VERSION=14.0.2
|
|
FROM openjdk:${JDK_VERSION}-slim AS worker
|
|
|
|
ARG ARCH=amd64
|
|
|
|
# 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
|
|
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 -
|
|
RUN add-apt-repository \
|
|
"deb [arch=${ARCH}] https://download.docker.com/linux/debian \
|
|
$(lsb_release -cs) \
|
|
stable"
|
|
RUN apt-get update && apt-get install -y docker-ce-cli jq
|
|
|
|
ENV APPLICATION airbyte-workers
|
|
|
|
WORKDIR /app
|
|
|
|
# Install kubectl
|
|
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.17.14/bin/linux/${ARCH}/kubectl
|
|
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
|
|
|
|
# wait for upstream dependencies to become available before starting server
|
|
ENTRYPOINT ["/bin/bash", "-c", "bin/${APPLICATION}"]
|