cassandra/.build/docker/bullseye-build.docker

55 lines
2.1 KiB
Docker

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM debian:bullseye
MAINTAINER Apache Cassandra <dev@cassandra.apache.org>
# CONTEXT is expected to be cassandra/.build
ENV DIST_DIR=/dist
ENV BUILD_HOME=/home/build
ENV CASSANDRA_DIR=$BUILD_HOME/cassandra
LABEL org.cassandra.buildenv=bullseye
RUN echo "Building with arguments:" \
&& echo " - DIST_DIR=${DIST_DIR}" \
&& echo " - BUILD_HOME=${BUILD_HOME}" \
&& echo " - CASSANDRA_DIR=${CASSANDRA_DIR}"
# configure apt to retry downloads
RUN echo 'APT::Acquire::Retries "99";' > /etc/apt/apt.conf.d/80-retries
RUN echo 'Acquire::http::Timeout "60";' > /etc/apt/apt.conf.d/80proxy.conf
RUN echo 'Acquire::ftp::Timeout "60";' >> /etc/apt/apt.conf.d/80proxy.conf
# install deps
RUN until apt-get update \
&& apt-get -y install ant build-essential curl devscripts ed git sudo \
python3-pip rsync procps dh-python quilt bash-completion ; \
do echo "apt failed… trying again in 10s… " ; sleep 10 ; done
RUN until apt-get update \
&& apt-get install -y --no-install-recommends openjdk-11-jdk openjdk-17-jdk ; \
do echo "apt failed… trying again in 10s… " ; sleep 10 ; done
RUN update-java-alternatives --set java-1.11.0-openjdk-$(dpkg --print-architecture)
# python3 is needed for the gen-doc target
RUN pip install --upgrade pip
# dependencies for .build/ci/ci_parser.py
RUN pip install beautifulsoup4==4.12.3 jinja2==3.1.3