potiuk commented on a change in pull request #5692: [AIRFLOW-5079] Checklicence test uses own, much smaller image URL: https://github.com/apache/airflow/pull/5692#discussion_r309078356
########## File path: Dockerfile-checklicence ########## @@ -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 \ Review comment: @ashb @mik-laj : exactly this is what I wanted to achieve - to share image layers with the other images we have. Another reason - I wanted to keep as much similarities as possible between the images (hence I install curl). @ashb: Curl is also generally useful if you ever want to do enter that image and do some download. But also from https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#add-or-copy: "Because image size matters, using ADD to fetch packages from remote URLs is strongly discouraged; you should use curl or wget instead." @mik-laj : Yes. Sudo is used in the run_* script. it's absolutely needed in order to cope with linux case. That's why we have to run everything as root user inside. otherwise we have problems with file permissions for files mounted from the host. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
