mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
19 lines
429 B
Docker
19 lines
429 B
Docker
# syntax=docker/dockerfile:1.3
|
|
FROM node:18-alpine AS builder
|
|
COPY --chown=1000:1000 . /fredy
|
|
WORKDIR /fredy
|
|
USER 1000
|
|
RUN yarn install
|
|
RUN yarn run prod
|
|
|
|
FROM node:16-alpine
|
|
COPY --from=builder --chown=1000:1000 /fredy /fredy
|
|
RUN mkdir /db /conf && \
|
|
chown 1000:1000 /db /conf && \
|
|
ln -s /db /fredy/db && ln -s /conf /fredy/conf
|
|
EXPOSE 9998
|
|
USER 1000
|
|
VOLUME [ "/conf", "/db" ]
|
|
WORKDIR /fredy
|
|
CMD node index.js --no-daemon
|