Skip to content

Commit

Permalink
[AIRFLOW-5842] Swtch to Debian buster image as a base (apache#7647)
Browse files Browse the repository at this point in the history
  • Loading branch information
potiuk committed Mar 7, 2020
1 parent 265282c commit cad20c2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
22 changes: 8 additions & 14 deletions Dockerfile
Expand Up @@ -15,12 +15,12 @@
#
# WARNING: THIS DOCKERFILE IS NOT INTENDED FOR PRODUCTION USE OR DEPLOYMENT.
#
ARG PYTHON_BASE_IMAGE="python:3.6-slim-stretch"
ARG PYTHON_BASE_IMAGE="python:3.6-slim-buster"
FROM ${PYTHON_BASE_IMAGE} as main

SHELL ["/bin/bash", "-o", "pipefail", "-e", "-u", "-x", "-c"]

ARG PYTHON_BASE_IMAGE="python:3.6-slim-stretch"
ARG PYTHON_BASE_IMAGE="python:3.6-slim-buster"
ENV PYTHON_BASE_IMAGE=${PYTHON_BASE_IMAGE}

ARG AIRFLOW_VERSION="2.0.0.dev0"
Expand Down Expand Up @@ -61,6 +61,7 @@ RUN curl --fail --location https://deb.nodesource.com/setup_10.x | bash - \
freetds-bin \
freetds-dev \
git \
graphviz \
gosu \
libffi-dev \
libkrb5-dev \
Expand All @@ -82,14 +83,6 @@ RUN curl --fail --location https://deb.nodesource.com/setup_10.x | bash - \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Install graphviz - needed to build docs with diagrams
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
graphviz \
&& apt-get autoremove -yqq --purge \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Install MySQL client from Oracle repositories (Debian installs mariadb)
RUN KEY="A4A9406876FCBD3C456770C88C718D3B5072E1F5" \
&& GNUPGHOME="$(mktemp -d)" \
Expand Down Expand Up @@ -118,15 +111,16 @@ RUN adduser airflow \
&& echo "airflow ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/airflow \
&& chmod 0440 /etc/sudoers.d/airflow

ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/

# Note missing man directories on debian-stretch
# Note missing man directories on debian-buster
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199
RUN mkdir -pv /usr/share/man/man1 \
&& mkdir -pv /usr/share/man/man7 \
&& echo "deb http://ftp.us.debian.org/debian sid main" \
> /etc/apt/sources.list.d/openjdk.list \
&& apt-get update \
&& apt-get install --no-install-recommends -y \
gnupg \
openjdk-8-jdk \
apt-transport-https \
bash-completion \
ca-certificates \
Expand All @@ -136,7 +130,6 @@ RUN mkdir -pv /usr/share/man/man1 \
less \
lsb-release \
net-tools \
openjdk-8-jdk \
openssh-client \
openssh-server \
postgresql-client \
Expand All @@ -149,6 +142,7 @@ RUN mkdir -pv /usr/share/man/man1 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/

# Install Hadoop and Hive
# It is done in one step to share variables.
Expand Down
2 changes: 1 addition & 1 deletion breeze
Expand Up @@ -435,7 +435,7 @@ function prepare_command_files() {
CI_ENTRYPOINT_FILE="/opt/airflow/scripts/ci/in_container/entrypoint_ci.sh"

# Base python image for the build
export PYTHON_BASE_IMAGE=python:${PYTHON_VERSION}-slim-stretch
export PYTHON_BASE_IMAGE=python:${PYTHON_VERSION}-slim-buster
export AIRFLOW_CI_IMAGE="${DOCKERHUB_USER}/${DOCKERHUB_REPO}:${BRANCH_NAME}-python${PYTHON_VERSION}-ci"
export BUILT_IMAGE_FLAG_FILE="${BUILD_CACHE_DIR}/${BRANCH_NAME}/.built_${PYTHON_VERSION}"

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/_utils.sh
Expand Up @@ -1063,7 +1063,7 @@ function set_common_image_variables {
export AIRFLOW_CI_SAVED_IMAGE_DIR="${BUILD_CACHE_DIR}/${DEFAULT_BRANCH}-python${PYTHON_VERSION}-ci-image"
export AIRFLOW_CI_IMAGE_ID_FILE="${BUILD_CACHE_DIR}/${DEFAULT_BRANCH}-python${PYTHON_VERSION}-ci-image.sha256"
export AIRFLOW_CI_IMAGE_DEFAULT="${DOCKERHUB_USER}/${DOCKERHUB_REPO}:${DEFAULT_BRANCH}-ci"
export PYTHON_BASE_IMAGE="python:${PYTHON_VERSION}-slim-stretch"
export PYTHON_BASE_IMAGE="python:${PYTHON_VERSION}-slim-buster"
export BUILT_IMAGE_FLAG_FILE="${BUILD_CACHE_DIR}/${BRANCH_NAME}/.built_${PYTHON_VERSION}"

}
Expand Down

0 comments on commit cad20c2

Please sign in to comment.