-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (17 loc) · 763 Bytes
/
Dockerfile
File metadata and controls
23 lines (17 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM node:25-bookworm-slim
# Install runtime dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends rsync openssh-client tini && \
rm -rf /var/lib/apt/lists/*
# Install hexo-cli at the version pinned in package-lock.json
COPY package.json package-lock.json /opt/hexo-cli/
WORKDIR /opt/hexo-cli
RUN npm ci && npm cache clean --force
ENV PATH="/opt/hexo-cli/node_modules/.bin:$PATH"
WORKDIR /
COPY setup /setup
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD node -e "require('http').get('http://localhost:8080/', r => r.statusCode === 200 ? process.exit(0) : process.exit(1)).on('error', () => process.exit(1))"
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["/bin/bash", "/setup/run.sh"]