# 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 ################# BUILDER ###################### # This image is not exactly minimal. CSI drivers require a number # of utils to create and manage volumes # Adding this as a variant here to ensure we are keeping it up to date ARG BASE_IMAGE=unused ARG BUILDER_IMAGE=unused 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 RUN set -x && \ export OUTPUT_DEBUG_LOG=${OUTPUT_DEBUG_LOG} && \ # manually "install" systemd to avoid installing the entire dep tree if_al2 clean_install systemd true true && \ # in al23 some of the exec depend on a common systemd lib which is included # in the systemd package. Installing systemd completely bloats the image # using install_binary to limit what is pulled from systemd and dependencies if_al2023 install_binary "/usr/lib/systemd/libsystemd-shared-*.so" && \ # libdb is needed by some of the libs pulled in above but not a direct dep # of any bins so its not pulled in automatically if_al2023 install_rpm libdb && \ # some of the install scriptlets need coreutils but the dep ordering # doesnt reflect, install manually to make sure its first clean_install coreutils && \ if_al2023 clean_install pcre2 && \ clean_install e2fsprogs \ nfs-utils \ util-linux \ xfsprogs && \ if_al2 remove_package systemd true && \ cleanup "csi"