mirror of
https://github.com/arjunkomath/openclaw-railway-template.git
synced 2026-08-14 00:48:11 +00:00
Amp-Thread-ID: https://ampcode.com/threads/T-019f96c5-ef79-7193-bbbc-d428b1059712 Co-authored-by: Arjun Komath <arjunkomath@gmail.com>
50 lines
1.4 KiB
Docker
50 lines
1.4 KiB
Docker
FROM node:24-bookworm
|
|
|
|
RUN apt-get update \
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
curl \
|
|
git \
|
|
gosu \
|
|
procps \
|
|
python3 \
|
|
tini \
|
|
build-essential \
|
|
zip \
|
|
unzip \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN npm install -g openclaw@2026.7.1-2
|
|
RUN npm install -g clawhub@latest
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json pnpm-lock.yaml ./
|
|
RUN corepack enable && pnpm install --frozen-lockfile --prod
|
|
|
|
COPY src ./src
|
|
COPY --chmod=755 entrypoint.sh ./entrypoint.sh
|
|
|
|
RUN useradd -m -s /bin/bash openclaw \
|
|
&& chown -R openclaw:openclaw /app \
|
|
&& mkdir -p /data && chown openclaw:openclaw /data \
|
|
&& mkdir -p /home/linuxbrew/.linuxbrew && chown -R openclaw:openclaw /home/linuxbrew
|
|
|
|
USER openclaw
|
|
RUN NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
|
|
ENV PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${PATH}"
|
|
ENV HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew"
|
|
ENV HOMEBREW_CELLAR="/home/linuxbrew/.linuxbrew/Cellar"
|
|
ENV HOMEBREW_REPOSITORY="/home/linuxbrew/.linuxbrew/Homebrew"
|
|
|
|
ENV PORT=8080
|
|
ENV OPENCLAW_ENTRY=/usr/local/lib/node_modules/openclaw/dist/entry.js
|
|
EXPOSE 8080
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s \
|
|
CMD curl -f http://localhost:8080/setup/healthz || exit 1
|
|
|
|
USER root
|
|
ENTRYPOINT ["tini", "--", "./entrypoint.sh"]
|