Skip to content

Commit

Permalink
chore(ct): upgrade base image with jattach v2.2
Browse files Browse the repository at this point in the history
jattach binary is now available for ARM64 and AMD64, but requires special handling with download URLs and checksums.
  • Loading branch information
poikilotherm committed Jul 15, 2024
1 parent 2176516 commit 904229f
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions modules/container-base/src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ RUN <<EOF
chmod -R g=u "${HOME_DIR}" "${STORAGE_DIR}" "${SECRETS_DIR}" "${DUMPS_DIR}"
EOF

ARG JATTACH_VERSION="v2.1"
ARG JATTACH_CHECKSUM="07885fdc782e02e7302c6d190f54c3930afa10a38140365adf54076ec1086a8e"
ARG JATTACH_VERSION="v2.2"
ARG JATTACH_TGZ_CHECKSUM_AMD64="acd9e17f15749306be843df392063893e97bfecc5260eef73ee98f06e5cfe02f"
ARG JATTACH_TGZ_CHECKSUM_ARM64="288ae5ed87ee7fe0e608c06db5a23a096a6217c9878ede53c4e33710bdcaab51"
ARG WAIT4X_VERSION="v2.14.0"
ARG PKGS="jq imagemagick curl unzip wget acl lsof procps netcat-openbsd dumb-init"

Expand All @@ -112,10 +113,15 @@ RUN <<EOF
apt-get install -qqy --no-install-recommends ${PKGS}
rm -rf "/var/lib/apt/lists/*"

# Install jattach
curl -sSfL -o /usr/bin/jattach "https://github.com/apangin/jattach/releases/download/${JATTACH_VERSION}/jattach"
echo "${JATTACH_CHECKSUM} /usr/bin/jattach" | sha256sum -c -
chmod +x /usr/bin/jattach
# Install jattach & wait4x
if [ "${TARGETARCH}" = "amd64" ]; then
curl -sSfL -o /usr/bin/jattach.tgz "https://github.com/jattach/jattach/releases/download/${JATTACH_VERSION}/jattach-linux-x64.tgz"
echo "${JATTACH_TGZ_CHECKSUM_AMD64} /usr/bin/jattach.tgz" | sha256sum -c -
elif [ "${TARGETARCH}" = "arm64" ]; then
curl -sSfL -o /usr/bin/jattach.tgz "https://github.com/jattach/jattach/releases/download/${JATTACH_VERSION}/jattach-linux-arm64.tgz"
echo "${JATTACH_TGZ_CHECKSUM_ARM64} /usr/bin/jattach.tgz" | sha256sum -c -
fi
tar -xzf /usr/bin/jattach.tgz -C /usr/bin && chmod +x /usr/bin/jattach

# Install wait4x
curl -sSfL -o /usr/bin/wait4x.tar.gz "https://github.com/atkrad/wait4x/releases/download/${WAIT4X_VERSION}/wait4x-linux-${TARGETARCH}.tar.gz"
Expand Down

0 comments on commit 904229f

Please sign in to comment.