wikijs/Dockerfile

50 lines
1.5 KiB
Docker
Raw Normal View History

2020-01-06 14:59:26 +00:00
FROM alpine:3.11 as builder
2019-11-02 10:32:49 +00:00
RUN apk add --no-cache \
git \
yarn \
2019-11-02 10:32:49 +00:00
make \
2020-01-06 15:02:57 +00:00
bash \
python3
2019-11-02 10:32:49 +00:00
# to get around errors from differing stack sizes in musl
# https://wiki.musl-libc.org/functional-differences-from-glibc.html#Thread_stack_size
#RUN npm config set unsafe-perm true
#RUN npm install -g webpack webpack-cli
RUN yarn global add webpack webpack-cli
2019-11-02 10:32:49 +00:00
2020-04-05 10:11:56 +00:00
ENV WIKIJS_VERSION=2.2.51
2019-11-02 11:41:36 +00:00
RUN git clone https://github.com/Requarks/wiki.git -b $WIKIJS_VERSION /build
ADD nextcloud-auth.patch /build/nextcloud-auth.patch
2019-11-02 10:32:49 +00:00
WORKDIR /build
RUN git apply nextcloud-auth.patch
#RUN npm install --production
#RUN make build
RUN yarn cache clean
RUN yarn --non-interactive
RUN yarn build
RUN rm -rf ./node_modules
RUN yarn --production --frozen-lockfile --non-interactive
2019-11-02 10:32:49 +00:00
FROM thallian/confd-env:latest
RUN addgroup -g 2222 wikijs
RUN adduser -h /home/wikijs -S -D -u 2222 -G wikijs wikijs
COPY --from=builder --chown=wikijs:wikijs /build/assets /home/wikijs/assets
COPY --from=builder --chown=wikijs:wikijs /build/node_modules /home/wikijs/node_modules
COPY --from=builder --chown=wikijs:wikijs /build/server /home/wikijs/server
COPY --from=builder --chown=wikijs:wikijs /build/LICENSE /home/wikijs/LICENSE
COPY --from=builder --chown=wikijs:wikijs /build/config.sample.yml /home/wikijs/config.sample.yml
COPY --from=builder --chown=wikijs:wikijs /build/package.json /home/wikijs/package.json
RUN apk add --no-cache \
2019-11-02 10:32:49 +00:00
nodejs
ADD /rootfs /
VOLUME [ "/home/wikijs/data" ]
EXPOSE 3000