puter/Dockerfile

33 lines
757 B
Docker
Raw Normal View History

2024-03-06 18:52:51 +00:00
FROM node:21-alpine
# Set labels
LABEL repo="https://github.com/HeyPuter/puter"
LABEL license="AGPL-3.0,https://github.com/HeyPuter/puter/blob/master/LICENSE.txt"
2024-03-31 09:18:03 +00:00
LABEL version="1.2.46-beta-1"
2024-03-06 18:52:51 +00:00
2024-03-31 09:18:03 +00:00
# Install git (required by Puter to check version)
RUN apk add --no-cache git
2024-03-06 18:52:51 +00:00
# Setup working directory
RUN mkdir -p /opt/puter/app
WORKDIR /opt/puter/app
# Add source files
# NOTE: This might change (https://github.com/HeyPuter/puter/discussions/32)
2024-03-06 02:15:23 +00:00
COPY . .
2024-03-06 18:52:51 +00:00
# Set permissions
RUN chown -R node:node /opt/puter/app
USER node
# Install node modules
RUN npm cache clean --force \
&& npm install
2024-03-31 09:18:03 +00:00
EXPOSE 4100
2024-03-06 18:52:51 +00:00
# HEALTHCHECK --interval=5m --timeout=3s \
# CMD wget --no-verbose --tries=1 --spider http://localhost:4100/ || exit 1
2024-03-06 18:52:51 +00:00
CMD [ "npm", "start" ]