wikijs-fork/dev/build-arm/Dockerfile

46 lines
1.1 KiB
Docker
Raw Normal View History

2019-12-15 04:12:54 +00:00
# =========================
# --- BUILD NPM MODULES ---
# =========================
2023-08-10 21:15:02 +00:00
FROM node:18-alpine AS build
2022-05-01 23:41:17 +00:00
RUN apk add yarn g++ make cmake python3 --no-cache
2019-12-15 04:12:54 +00:00
WORKDIR /wiki
COPY ./package.json ./package.json
COPY ./patches ./patches
2019-12-15 04:12:54 +00:00
RUN yarn --production --frozen-lockfile --non-interactive --network-timeout 100000
2023-08-10 22:56:38 +00:00
RUN yarn patch-package
2019-12-15 04:12:54 +00:00
# ===============
# --- Release ---
# ===============
2023-08-10 21:15:02 +00:00
FROM node:18-alpine
2019-12-15 03:25:46 +00:00
LABEL maintainer="requarks.io"
RUN apk add bash curl git openssh gnupg sqlite --no-cache && \
mkdir -p /wiki && \
mkdir -p /logs && \
2020-04-17 02:05:53 +00:00
mkdir -p /wiki/data/content && \
2019-12-15 03:25:46 +00:00
chown -R node:node /wiki /logs
WORKDIR /wiki
COPY --chown=node:node ./build/assets ./assets
2019-12-15 04:12:54 +00:00
COPY --chown=node:node --from=build /wiki/node_modules ./node_modules
2019-12-15 03:25:46 +00:00
COPY --chown=node:node ./server ./server
COPY --chown=node:node ./build/server/views ./server/views
COPY --chown=node:node ./dev/build/config.yml ./config.yml
COPY --chown=node:node ./build/package.json ./package.json
2019-12-15 03:25:46 +00:00
COPY --chown=node:node ./LICENSE ./LICENSE
USER node
2020-04-17 02:05:53 +00:00
VOLUME ["/wiki/data/content"]
2019-12-15 03:25:46 +00:00
EXPOSE 3000
2020-04-17 02:05:53 +00:00
EXPOSE 3443
2019-12-15 03:25:46 +00:00
CMD ["node", "server"]