2021-04-28 16:55:29 +02:00
|
|
|
FROM golang:alpine as gobuild
|
2021-03-17 18:07:04 +01:00
|
|
|
|
2021-04-28 16:55:29 +02:00
|
|
|
RUN apk update && \
|
|
|
|
apk add ca-certificates gcc git make musl-dev && \
|
|
|
|
git clone https://github.com/mattermost/focalboard && \
|
|
|
|
cd focalboard && \
|
|
|
|
make server-linux
|
2021-03-18 07:57:33 +01:00
|
|
|
|
2021-04-28 16:55:29 +02:00
|
|
|
FROM node:alpine as nodebuild
|
2021-03-17 18:07:04 +01:00
|
|
|
|
2021-04-28 16:55:29 +02:00
|
|
|
RUN apk update && \
|
|
|
|
apk add ca-certificates git && \
|
|
|
|
git clone https://github.com/mattermost/focalboard && \
|
|
|
|
cd focalboard/webapp && \
|
|
|
|
npm install && npm run pack
|
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
ARG PUID=2000
|
|
|
|
ARG PGID=2000
|
|
|
|
|
2021-06-22 10:08:16 +02:00
|
|
|
EXPOSE 8000/tcp 9092/tcp
|
2021-04-28 16:55:29 +02:00
|
|
|
|
2021-06-07 11:20:32 +02:00
|
|
|
VOLUME /data
|
|
|
|
|
2021-04-28 16:55:29 +02:00
|
|
|
RUN addgroup -g ${PGID} focalboard && \
|
|
|
|
adduser -H -D -u ${PUID} -G focalboard focalboard
|
2021-03-17 18:07:04 +01:00
|
|
|
|
|
|
|
WORKDIR /opt/focalboard
|
|
|
|
|
2021-04-28 16:55:29 +02:00
|
|
|
COPY --from=gobuild /go/focalboard/bin/linux/focalboard-server bin/
|
|
|
|
COPY --from=nodebuild /focalboard/webapp/pack pack/
|
|
|
|
COPY --from=nodebuild /focalboard/LICENSE.txt LICENSE.txt
|
2021-06-07 11:20:32 +02:00
|
|
|
COPY --from=nodebuild /focalboard/docker/server_config.json config.json
|
2021-04-28 16:55:29 +02:00
|
|
|
|
|
|
|
RUN chown -R ${PUID}:${PGID} /opt/focalboard
|
|
|
|
|
|
|
|
USER focalboard
|
|
|
|
|
|
|
|
CMD ["/opt/focalboard/bin/focalboard-server"]
|