wikijs/Dockerfile

42 lines
1.2 KiB
Docker
Raw Normal View History

2019-11-02 10:32:49 +00:00
FROM alpine:3.10 as builder
RUN apk add --no-cache \
git \
npm \
make \
bash
# 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
2019-11-02 10:32:49 +00:00
RUN npm install -g webpack webpack-cli
2019-11-02 14:41:08 +00:00
ENV WIKIJS_VERSION=f47e27332e54f6105a5aab8c9a95a3ebaed3ba7a
2019-11-02 11:41:36 +00:00
2019-11-02 10:32:49 +00:00
RUN git clone https://code.vanwa.ch/sebastian/wikijs.git -b nextcloud-auth /build
WORKDIR /build
2019-11-02 11:41:36 +00:00
RUN git checkout $WIKIJS_VERSION
2019-11-02 10:32:49 +00:00
RUN npm install
RUN make build
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