forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AIRFLOW-5079] Checklicence test uses own, much smaller image (apache…
- Loading branch information
Showing
4 changed files
with
123 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# 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. | ||
# | ||
# WARNING: THIS DOCKERFILE IS NOT INTENDED FOR PRODUCTION USE OR DEPLOYMENT. | ||
# | ||
FROM debian:stretch-slim | ||
|
||
SHELL ["/bin/bash", "-o", "pipefail", "-e", "-u", "-x", "-c"] | ||
|
||
# Make sure noninteractie debian install is used and language variables set | ||
ENV DEBIAN_FRONTEND=noninteractive LANGUAGE=C.UTF-8 LANG=C.UTF-8 LC_ALL=C.UTF-8 \ | ||
LC_CTYPE=C.UTF-8 LC_MESSAGES=C.UTF-8 | ||
|
||
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ | ||
|
||
# Note missing man directories on debian-stretch | ||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199 | ||
# Install OpenJDK | ||
RUN mkdir -pv /usr/share/man/man1 \ | ||
&& mkdir -pv /usr/share/man/man7 \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
sudo \ | ||
curl \ | ||
openjdk-8-jdk \ | ||
&& apt-get autoremove -yqq --purge \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ARG RAT_VERSION="0.12" | ||
|
||
ENV RAT_VERSION="${RAT_VERSION}" \ | ||
RAT_JAR="/tmp/apache-rat-${RAT_VERSION}.jar" \ | ||
RAT_URL="http://repo1.maven.org/maven2/org/apache/rat/apache-rat/${RAT_VERSION}/apache-rat-${RAT_VERSION}.jar" | ||
|
||
RUN echo "Downloading RAT from ${RAT_URL} to ${RAT_JAR}" \ | ||
&& curl -sL ${RAT_URL} > ${RAT_JAR} | ||
|
||
ARG AIRFLOW_USER=airflow | ||
ENV AIRFLOW_USER=${AIRFLOW_USER} | ||
|
||
ARG HOME=/home/airflow | ||
ENV HOME=${HOME} | ||
|
||
ARG AIRFLOW_HOME=${HOME}/airflow | ||
ENV AIRFLOW_HOME=${AIRFLOW_HOME} | ||
|
||
ARG AIRFLOW_SOURCES=/opt/airflow | ||
ENV AIRFLOW_SOURCES=${AIRFLOW_SOURCES} | ||
|
||
RUN adduser airflow \ | ||
&& echo "airflow ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/airflow \ | ||
&& chmod 0440 /etc/sudoers.d/airflow | ||
|
||
COPY --chown=airflow:airflow scripts ${AIRFLOW_SOURCES}/scripts | ||
|
||
USER airflow | ||
|
||
WORKDIR ${AIRFLOW_SOURCES} | ||
|
||
ENTRYPOINT ["/opt/airflow/scripts/ci/in_container/run_check_licence.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters