Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 2 additions & 114 deletions base/ubi10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN \
\
# Install the main list of packages (no full system update)
dnf install -y --setopt=install_weak_deps=False \
diffutils git git-lfs iproute jq less lsof man nano procps \
bat diffutils fd-find git git-lfs iproute jq less lsof man nano procps \
p7zip p7zip-plugins perl-Digest-SHA net-tools \
openssh-clients openssl ripgrep rsync socat sudo \
time vim wget zip && \
Expand Down Expand Up @@ -80,118 +80,6 @@ RUN \
fi && \
cd - && rm -rf "${TEMP_DIR}"

# Download and install ripgrep depending on the architecture.
# See release page for details https://github.com/BurntSushi/ripgrep/releases/tag/13.0.0

RUN set -e; \
case "$TARGETARCH" in \
ppc64le) \
echo "Skipping ripgrep installation for ppc64le as binary not available"; \
exit 0 ;; \
arm64) \
RG_ARCH="arm-unknown-linux-gnueabihf" ;; \
amd64) \
RG_ARCH="x86_64-unknown-linux-musl" ;; \
*) \
echo "Unsupported architecture for ripgrep: $TARGETARCH"; \
exit 0 ;; \
esac; \
TEMP_DIR="$(mktemp -d)"; \
cd "${TEMP_DIR}"; \
RG_VERSION="13.0.0"; \
RG_TGZ="ripgrep-${RG_VERSION}-${RG_ARCH}.tar.gz"; \
RG_TGZ_URL="https://github.com/BurntSushi/ripgrep/releases/download/${RG_VERSION}/${RG_TGZ}"; \
echo "Downloading ${RG_TGZ_URL} ..."; \
if curl -fsSL "${RG_TGZ_URL}" -o "${RG_TGZ}"; then \
if file "${RG_TGZ}" | grep -q 'gzip compressed'; then \
tar -zxf "${RG_TGZ}" --no-same-owner; \
install -m 0755 "ripgrep-${RG_VERSION}-${RG_ARCH}/rg" /usr/local/bin/rg; \
mkdir -p /usr/local/share/man/man1; \
install -m 0644 "ripgrep-${RG_VERSION}-${RG_ARCH}/doc/rg.1" /usr/local/share/man/man1/; \
else \
echo "Downloaded ripgrep archive invalid — skipping."; \
fi; \
else \
echo "ripgrep binary not found for ${TARGETARCH}, skipping installation."; \
fi; \
cd - >/dev/null; \
rm -rf "${TEMP_DIR}"


# Download and install bat depending on the architecture.
# See release page for details https://github.com/sharkdp/bat/releases/tag/v0.18.3

RUN set -e; \
case "$TARGETARCH" in \
ppc64le) \
echo "Skipping bat installation for ppc64le as binary not available"; \
exit 0 ;; \
arm64) \
BAT_ARCH="aarch64-unknown-linux-gnu" ;; \
amd64) \
BAT_ARCH="x86_64-unknown-linux-musl" ;; \
*) \
echo "Unsupported architecture for bat: $TARGETARCH"; \
exit 0 ;; \
esac; \
TEMP_DIR="$(mktemp -d)"; \
cd "${TEMP_DIR}"; \
BAT_VERSION="v0.18.3"; \
BAT_TGZ="bat-v${BAT_VERSION}-${BAT_ARCH}.tar.gz"; \
BAT_TGZ_URL="https://github.com/sharkdp/bat/releases/download/v${BAT_VERSION}/${BAT_TGZ}"; \
echo "Downloading ${BAT_TGZ_URL} ..."; \
if curl -fsSL "${BAT_TGZ_URL}" -o "${BAT_TGZ}"; then \
if file "${BAT_TGZ}" | grep -q 'gzip compressed'; then \
tar -zxf "${BAT_TGZ}" --no-same-owner; \
install -m 0755 "bat-v${BAT_VERSION}-${BAT_ARCH}/bat" /usr/local/bin/bat; \
mkdir -p /usr/local/share/man/man1; \
install -m 0644 "bat-v${BAT_VERSION}-${BAT_ARCH}/bat.1" /usr/local/share/man/man1/; \
else \
echo "Downloaded bat archive invalid — skipping."; \
fi; \
else \
echo "bat binary not found for ${TARGETARCH}, skipping installation."; \
fi; \
cd - >/dev/null; \
rm -rf "${TEMP_DIR}"

# Download and install fd depending on the architecture.
# See release page for details https://github.com/sharkdp/fd/releases/tag/v8.7.0

RUN set -e; \
case "$TARGETARCH" in \
ppc64le) \
echo "Skipping fd installation for ppc64le as binary not available"; \
exit 0 ;; \
arm64) \
FD_ARCH="aarch64-unknown-linux-gnu" ;; \
amd64) \
FD_ARCH="x86_64-unknown-linux-musl" ;; \
*) \
echo "Unsupported architecture for fd: $TARGETARCH"; \
exit 0 ;; \
esac; \
TEMP_DIR="$(mktemp -d)"; \
cd "${TEMP_DIR}"; \
FD_VERSION="8.7.0"; \
FD_TGZ="fd-v${FD_VERSION}-${FD_ARCH}.tar.gz"; \
FD_TGZ_URL="https://github.com/sharkdp/fd/releases/download/v${FD_VERSION}/${FD_TGZ}"; \
echo "Downloading ${FD_TGZ_URL} ..."; \
if curl -fsSL "${FD_TGZ_URL}" -o "${FD_TGZ}"; then \
if file "${FD_TGZ}" | grep -q 'gzip compressed'; then \
tar -xf "${FD_TGZ}" --no-same-owner; \
install -m 0755 "fd-v${FD_VERSION}-${FD_ARCH}/fd" /usr/local/bin/fd; \
mkdir -p /usr/local/share/man/man1; \
install -m 0644 "fd-v${FD_VERSION}-${FD_ARCH}/fd.1" /usr/local/share/man/man1/; \
else \
echo "Downloaded fd archive invalid — skipping."; \
fi; \
else \
echo "fd binary not found for ${TARGETARCH}, skipping installation."; \
fi; \
cd - >/dev/null; \
rm -rf "${TEMP_DIR}"

# Define user directory for binaries
ENV PATH="/home/user/.local/bin:$PATH"

Expand Down Expand Up @@ -285,4 +173,4 @@ ENV HOME=/home/user
WORKDIR /projects
# /usr/libexec/podman/catatonit is used to reap zombie processes
ENTRYPOINT ["/usr/libexec/podman/catatonit","--","/entrypoint.sh"]
CMD ["tail", "-f", "/dev/null"]
CMD ["tail", "-f", "/dev/null"]
115 changes: 4 additions & 111 deletions base/ubi9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ RUN mkdir -p /home/tooling/

## add epel repos so that p7zip p7zip-plugins stow can be found
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
dnf install -y diffutils git git-lfs iproute jq less lsof man nano procps p7zip p7zip-plugins \
perl-Digest-SHA net-tools openssh-clients rsync socat sudo time vim wget zip stow && \
dnf install -y bat diffutils fd-find git git-lfs iproute jq less lsof man \
nano procps p7zip p7zip-plugins perl-Digest-SHA net-tools \
openssh-clients ripgrep rsync socat sudo time vim wget zip stow && \
dnf update -y && \
dnf clean all

Expand Down Expand Up @@ -63,114 +64,6 @@ RUN \
fi && \
cd - && rm -rf "${TEMP_DIR}"

# Download and install ripgrep depending on the architecture.
# See release page for details https://github.com/BurntSushi/ripgrep/releases/tag/15.1.0
RUN set -e; \
case "$TARGETARCH" in \
ppc64le) \
echo "Skipping ripgrep installation for ppc64le as binary not available"; \
exit 0 ;; \
arm64) \
RG_ARCH="arm-unknown-linux-gnueabihf" ;; \
amd64) \
RG_ARCH="x86_64-unknown-linux-musl" ;; \
*) \
echo "Unsupported architecture for ripgrep: $TARGETARCH"; \
exit 0 ;; \
esac; \
TEMP_DIR="$(mktemp -d)"; \
cd "${TEMP_DIR}"; \
RG_VERSION="15.1.0"; \
RG_TGZ="ripgrep-${RG_VERSION}-${RG_ARCH}.tar.gz"; \
RG_TGZ_URL="https://github.com/BurntSushi/ripgrep/releases/download/${RG_VERSION}/${RG_TGZ}"; \
echo "Downloading ${RG_TGZ_URL} ..."; \
if curl -fsSL "${RG_TGZ_URL}" -o "${RG_TGZ}"; then \
if file "${RG_TGZ}" | grep -q 'gzip compressed'; then \
tar -zxf "${RG_TGZ}" --no-same-owner; \
install -m 0755 "ripgrep-${RG_VERSION}-${RG_ARCH}/rg" /usr/local/bin/rg; \
mkdir -p /usr/local/share/man/man1; \
install -m 0644 "ripgrep-${RG_VERSION}-${RG_ARCH}/doc/rg.1" /usr/local/share/man/man1/; \
else \
echo "Downloaded ripgrep archive invalid — skipping."; \
fi; \
else \
echo "ripgrep binary not found for ${TARGETARCH}, skipping installation."; \
fi; \
cd - >/dev/null; \
rm -rf "${TEMP_DIR}"

# Download and install bat depending on the architecture.
# See release page for details https://github.com/sharkdp/bat/releases/tag/v0.26.0
RUN set -e; \
case "$TARGETARCH" in \
ppc64le) \
echo "Skipping bat installation for ppc64le as binary not available"; \
exit 0 ;; \
arm64) \
BAT_ARCH="aarch64-unknown-linux-gnu" ;; \
amd64) \
BAT_ARCH="x86_64-unknown-linux-musl" ;; \
*) \
echo "Unsupported architecture for bat: $TARGETARCH"; \
exit 0 ;; \
esac; \
TEMP_DIR="$(mktemp -d)"; \
cd "${TEMP_DIR}"; \
BAT_VERSION="v0.26.0"; \
BAT_TGZ="bat-v${BAT_VERSION}-${BAT_ARCH}.tar.gz"; \
BAT_TGZ_URL="https://github.com/sharkdp/bat/releases/download/v${BAT_VERSION}/${BAT_TGZ}"; \
echo "Downloading ${BAT_TGZ_URL} ..."; \
if curl -fsSL "${BAT_TGZ_URL}" -o "${BAT_TGZ}"; then \
if file "${BAT_TGZ}" | grep -q 'gzip compressed'; then \
tar -zxf "${BAT_TGZ}" --no-same-owner; \
install -m 0755 "bat-v${BAT_VERSION}-${BAT_ARCH}/bat" /usr/local/bin/bat; \
mkdir -p /usr/local/share/man/man1; \
install -m 0644 "bat-v${BAT_VERSION}-${BAT_ARCH}/bat.1" /usr/local/share/man/man1/; \
else \
echo "Downloaded bat archive invalid — skipping."; \
fi; \
else \
echo "bat binary not found for ${TARGETARCH}, skipping installation."; \
fi; \
cd - >/dev/null; \
rm -rf "${TEMP_DIR}"

# Download and install fd depending on the architecture.
# See release page for details https://github.com/sharkdp/fd/releases/tag/v10.3.0
RUN set -e; \
case "$TARGETARCH" in \
ppc64le) \
echo "Skipping fd installation for ppc64le as binary not available"; \
exit 0 ;; \
arm64) \
FD_ARCH="aarch64-unknown-linux-gnu" ;; \
amd64) \
FD_ARCH="x86_64-unknown-linux-musl" ;; \
*) \
echo "Unsupported architecture for fd: $TARGETARCH"; \
exit 0 ;; \
esac; \
TEMP_DIR="$(mktemp -d)"; \
cd "${TEMP_DIR}"; \
FD_VERSION="10.3.0"; \
FD_TGZ="fd-v${FD_VERSION}-${FD_ARCH}.tar.gz"; \
FD_TGZ_URL="https://github.com/sharkdp/fd/releases/download/v${FD_VERSION}/${FD_TGZ}"; \
echo "Downloading ${FD_TGZ_URL} ..."; \
if curl -fsSL "${FD_TGZ_URL}" -o "${FD_TGZ}"; then \
if file "${FD_TGZ}" | grep -q 'gzip compressed'; then \
tar -xf "${FD_TGZ}" --no-same-owner; \
install -m 0755 "fd-v${FD_VERSION}-${FD_ARCH}/fd" /usr/local/bin/fd; \
mkdir -p /usr/local/share/man/man1; \
install -m 0644 "fd-v${FD_VERSION}-${FD_ARCH}/fd.1" /usr/local/share/man/man1/; \
else \
echo "Downloaded fd archive invalid — skipping."; \
fi; \
else \
echo "fd binary not found for ${TARGETARCH}, skipping installation."; \
fi; \
cd - >/dev/null; \
rm -rf "${TEMP_DIR}"

# Define user directory for binaries
ENV PATH="/home/user/.local/bin:$PATH"

Expand Down Expand Up @@ -263,4 +156,4 @@ ENV HOME=/home/user
WORKDIR /projects
# /usr/libexec/podman/catatonit is used to reap zombie processes
ENTRYPOINT ["/usr/libexec/podman/catatonit","--","/entrypoint.sh"]
CMD ["tail", "-f", "/dev/null"]
CMD ["tail", "-f", "/dev/null"]