# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. # # Licensed 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. # *NOTE* we have to limit our number of layers heres because in presubmits there # is no overlay fs and we will run out of space quickly ARG BASE_IMAGE=unused ARG BUILDER_IMAGE=unused ################# BUILDER ###################### FROM ${BUILDER_IMAGE} as builder ARG OUTPUT_DEBUG_LOG # Copy scripts in every variant since we do not rebuild the base # every time these scripts change. This ensures whenever a variant is # built it has the latest scripts in the builder COPY scripts/ /usr/bin # test included with python, obviously not needed, and missing a dep (al22) ENV CLEANUP_UNNECESSARY_FILES="/usr/lib64/python3.9/site-packages/hawkey/test/_hawkey_test.so" # This build is meant to include the deps from the kind base image defined in the upstream # dockerfile, plus the changes from the patching we do in eks-anywhere-build-tooling # if the packages get out of date, its not the end of the world since the resulting image # will contain yum and the eks-anwyhere build can instal additional packages as neccessary # the intent is for the yum installs downstream are no-ops RUN set -x && \ export OUTPUT_DEBUG_LOG=${OUTPUT_DEBUG_LOG} && \ enable_docker_install && \ # some of the install scriptlets need coreutils but the dep ordering # doesnt reflect, install manually to make sure its first clean_install coreutils && \ clean_install findutils && \ if_al2 clean_install amazon-linux-extras && \ if_al2023 clean_install pcre2 && \ clean_install "containerd curl ethtool hostname iproute jq lockdev nfs-utils pigz procps rsync libseccomp socat sudo systemd tar util-linux which yum" && \ cleanup "kind"