23 lines
545 B
Docker
23 lines
545 B
Docker
FROM node:22-alpine
|
|
|
|
RUN apk add --no-cache libreoffice curl \
|
|
&& addgroup -S sandbox \
|
|
&& adduser -S -G sandbox -s /bin/sh -D sandbox \
|
|
&& mkdir -p /app /tmp/convert \
|
|
&& chown -R sandbox:sandbox /app /tmp/convert
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --chown=sandbox:sandbox package.json ./
|
|
RUN npm install --omit=dev
|
|
|
|
COPY --chown=sandbox:sandbox convert.js ./
|
|
|
|
USER sandbox
|
|
|
|
EXPOSE 3002
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
|
CMD curl -f http://localhost:3002/health || exit 1
|
|
|
|
CMD ["node", "convert.js"]
|