Files
remote-mcp-manager/Dockerfile
Dasemu 06d43f4ed8
Some checks failed
CI / test (push) Has been cancelled
fix: install nixpacks from its pinned GitHub release instead of ghcr.io image
ghcr.io/railwayapp/nixpacks no longer ships the nixpacks CLI binary at
/usr/bin/nixpacks (the image was repurposed upstream for something
else — confirmed while deploying to production, build failed with
"not found" for the pinned 1.41.0 tag). Download the exact release
tarball from GitHub instead, still pinned to the same version.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-08 04:22:02 +02:00

43 lines
1.6 KiB
Docker

FROM docker:27-cli AS dockercli
FROM debian:12-slim AS nixpacks
# ghcr.io/railwayapp/nixpacks no longer ships the CLI binary in its image (repurposed
# upstream for something else) — pull the pinned release tarball from GitHub instead.
ARG NIXPACKS_VERSION=1.41.0
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& curl -fsSL -o /tmp/nixpacks.tar.gz \
"https://github.com/railwayapp/nixpacks/releases/download/v${NIXPACKS_VERSION}/nixpacks-v${NIXPACKS_VERSION}-x86_64-unknown-linux-gnu.tar.gz" \
&& tar -xzf /tmp/nixpacks.tar.gz -C /usr/bin nixpacks \
&& rm /tmp/nixpacks.tar.gz
FROM node:20-slim AS build
WORKDIR /repo
COPY package.json package-lock.json ./
COPY apps/server/package.json apps/server/package.json
COPY apps/web/package.json apps/web/package.json
RUN npm ci
COPY apps/server apps/server
COPY apps/web apps/web
RUN npm run build --workspace apps/web
RUN npm run build --workspace apps/server
FROM node:20-slim
RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=nixpacks /usr/bin/nixpacks /usr/local/bin/nixpacks
COPY --from=dockercli /usr/local/bin/docker /usr/local/bin/docker
WORKDIR /repo
COPY package.json package-lock.json ./
COPY apps/server/package.json apps/server/package.json
RUN npm ci --omit=dev --workspace apps/server
COPY --from=build /repo/apps/server/dist apps/server/dist
COPY --from=build /repo/apps/web/dist apps/web/dist
WORKDIR /repo/apps/server
ENV NODE_ENV=production
EXPOSE 3000
CMD ["node", "dist/index.js"]