# 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 ################# BASE-NONROOT ################ 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 # libraries included in RPMs with required libraries but are not used and missing deps ENV CLEANUP_UNNECESSARY_FILES="/usr/lib64/libsystemd.so.* /usr/lib64/libsystemd-journal.so.* /usr/lib64/security/pam_systemd.so /usr/lib64/libnss_systemd.so.2" RUN set -x && \ export OUTPUT_DEBUG_LOG=${OUTPUT_DEBUG_LOG} && \ install_binary /usr/sbin/blkid \ /usr/sbin/blockdev \ /usr/sbin/dumpe2fs \ /usr/sbin/resize2fs \ /usr/sbin/fsck /usr/sbin/fsck.ext4 /usr/sbin/fsck.ext3 \ /usr/sbin/mkfs /usr/sbin/mkfs.ext4 /usr/sbin/mkfs.ext3 /usr/sbin/mkfs.xfs \ /usr/sbin/xfs_io /usr/sbin/xfs_growfs \ /usr/bin/umount /usr/bin/mount \ /usr/bin/lsblk && \ cleanup "csi-ebs"