Skip to content
This repository has been archived by the owner on Dec 29, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kiorky committed Sep 19, 2024
1 parent e66c129 commit 99d0125
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
4 changes: 0 additions & 4 deletions Dockerfile.squash
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,3 @@ FROM $RSYNC AS squashed-rsync
FROM $ANCESTOR AS squashed-ancestor
ARG ROOTFS="/BASE_ROOTFS_TO_COPY_THAT_WONT_COLLIDE_1234567890"
ARG PATH="${ROOTFS}_rsync/bin:$PATH"
SHELL ["busybox", "sh", "-c"]
RUN --mount=type=bind,from=final,target=$ROOTFS --mount=type=bind,from=squashed-rsync,target=${ROOTFS}_rsync \
rsync -Aaz --delete ${ROOTFS}/ / --exclude=/proc --exclude=/sys --exclude=/etc/resolv.conf --exclude=/etc/hosts --exclude=$ROOTFS* --exclude=dev/shm --exclude=dev/pts --exclude=dev/mqueue
SHELL ["/bin/sh", "-c"]
4 changes: 4 additions & 0 deletions Dockerfile.squashexec
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SHELL ["busybox", "sh", "-c"]
RUN --mount=type=bind,from=final,target=$ROOTFS --mount=type=bind,from=squashed-rsync,target=${ROOTFS}_rsync \
rsync -Aaz --delete ${ROOTFS}/ / --exclude=/proc --exclude=/sys --exclude=/etc/resolv.conf --exclude=/etc/hosts --exclude=$ROOTFS* --exclude=dev/shm --exclude=dev/pts --exclude=dev/mqueue
SHELL ["/bin/sh", "-c"]
2 changes: 1 addition & 1 deletion helpers/cops_pkgmgr_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ is_debian_like() { echo $DISTRIB_ID | grep -E -iq "debian|ubuntu|mint"; }
is_suse_like() { echo $DISTRIB_ID | grep -E -iq "suse"; }
is_alpine_like() { echo $DISTRIB_ID | grep -E -iq "alpine" || test -e /etc/alpine-release; }
is_redhat_like() { echo $DISTRIB_ID \
| grep -E -iq "((^ol$)|rhel|redhat|red-hat|centos|fedora)"; }
| grep -E -iq "((^ol$)|rhel|redhat|red-hat|centos|fedora|amzn)"; }
set_lang() { locale=${1:-C};export LANG=${locale};export LC_ALL=${locale}; }
is_darwin () {
if [ "x${FORCE_DARWIN-}" != "x" ];then return 0;fi
Expand Down
6 changes: 4 additions & 2 deletions helpers/up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ if ( grep -q amzn /etc/os-release );then
if ( amazon-linux-extras help >/dev/null 2>&1 );then
amazon-linux-extras install -y epel
else
yum install -y epel-release
yum-config-manager --enable epel
if ( yum list | grep -q epel );then
yum install -y epel-release
yum-config-manager --enable epel
fi
fi
fi
if [ -e /etc/redhat-release ];then
Expand Down
2 changes: 1 addition & 1 deletion main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ gen_image() {
if [ -e "$df" ];then dockerfiles="$dockerfiles $df" && break;fi
done
local parts=""
for partsstep in squashpre from args argspost helpers pre base post postextra clean cleanpost predosquash squash postdosquash extra labels labelspost;do
for partsstep in squashpre from args argspost helpers pre base post postextra clean cleanpost predosquash squash squashpreexec squashexec postdosquash extra labels labelspost;do
parts="$parts pre_${partsstep} ${partsstep} post_${partsstep}"
done
parts=$(echo "$parts"|xargs)
Expand Down

0 comments on commit 99d0125

Please sign in to comment.