Skip to content

Commit 7372852

Browse files
build(moltis): install release .deb assets for amd64/arm64
1 parent c1b120f commit 7372852

1 file changed

Lines changed: 9 additions & 13 deletions

File tree

.docker/moltis/Dockerfile.stack

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Combined Dockerfile for stack usage:
2-
# - Installs moltis binary from GitHub release assets (no local compilation)
2+
# - Installs moltis .deb from GitHub release assets (no local compilation)
33
# - Adds Node.js, uv, and mcp-proxy used by this stack
44
FROM debian:bookworm-slim
55

@@ -21,21 +21,17 @@ RUN apt-get update -qq && \
2121
gnupg \
2222
git \
2323
nodejs \
24-
npm \
25-
zstd && \
24+
npm && \
2625
case "${TARGETARCH}" in \
27-
amd64) MOLTIS_ARCH="x86_64" ;; \
28-
arm64) MOLTIS_ARCH="aarch64" ;; \
26+
amd64) DEB_ARCH="amd64" ;; \
27+
arm64) DEB_ARCH="arm64" ;; \
2928
*) echo "Unsupported TARGETARCH: ${TARGETARCH}"; exit 1 ;; \
3029
esac && \
31-
RELEASE_JSON="$(curl -fsSL "https://api.github.com/repos/moltis-org/moltis/releases/tags/${MOLTIS_VERSION}")" && \
32-
ASSET_URL="$(printf '%s' "${RELEASE_JSON}" | grep -o "https://github.com/moltis-org/moltis/releases/download/${MOLTIS_VERSION}/moltis-[^\"]*-${MOLTIS_ARCH}\\.pkg\\.tar\\.zst" | head -n1)" && \
33-
if [ -z "${ASSET_URL}" ]; then echo "Failed to resolve moltis asset URL for ${MOLTIS_VERSION}/${MOLTIS_ARCH}"; exit 1; fi && \
34-
curl -fsSL "${ASSET_URL}" -o /tmp/moltis.pkg.tar.zst && \
35-
mkdir -p /tmp/moltis-pkg && \
36-
tar --use-compress-program=unzstd -xf /tmp/moltis.pkg.tar.zst -C /tmp/moltis-pkg && \
37-
install -m 0755 /tmp/moltis-pkg/usr/bin/moltis /usr/local/bin/moltis && \
38-
rm -rf /tmp/moltis.pkg.tar.zst /tmp/moltis-pkg && \
30+
MOLTIS_VERSION_NO_V="${MOLTIS_VERSION#v}" && \
31+
DEB_URL="https://github.com/moltis-org/moltis/releases/download/${MOLTIS_VERSION}/moltis_${MOLTIS_VERSION_NO_V}-1_${DEB_ARCH}.deb" && \
32+
curl -fsSL "${DEB_URL}" -o /tmp/moltis.deb && \
33+
apt-get install -yqq --no-install-recommends /tmp/moltis.deb && \
34+
rm -f /tmp/moltis.deb && \
3935
curl -LsSf https://astral.sh/uv/install.sh | sh && \
4036
/root/.local/bin/uv tool install git+https://github.com/sparfenyuk/mcp-proxy && \
4137
ln -sf /root/.local/bin/uv /usr/local/bin/uv && \

0 commit comments

Comments
 (0)