2021-07-01 11:46:03 +02:00
|
|
|
### Webapp build
|
|
|
|
FROM node:16.3.0 as nodebuild
|
2021-03-17 19:07:04 +02:00
|
|
|
|
2021-07-01 11:46:03 +02:00
|
|
|
WORKDIR /webapp
|
|
|
|
ADD webapp/ /webapp
|
2021-03-18 08:57:33 +02:00
|
|
|
|
2021-07-01 11:46:03 +02:00
|
|
|
RUN npm install --no-optional && \
|
|
|
|
npm run pack
|
2021-03-17 19:07:04 +02:00
|
|
|
|
2021-07-01 11:46:03 +02:00
|
|
|
### Go build
|
|
|
|
FROM golang:1.16.5 as gobuild
|
2021-04-28 16:55:29 +02:00
|
|
|
|
2021-07-01 11:46:03 +02:00
|
|
|
WORKDIR /go/src/focalboard
|
|
|
|
ADD . /go/src/focalboard
|
2021-04-28 16:55:29 +02:00
|
|
|
|
2021-07-01 11:46:03 +02:00
|
|
|
RUN make server-linux
|
2021-04-28 16:55:29 +02:00
|
|
|
|
2021-07-01 11:46:03 +02:00
|
|
|
## Final image
|
|
|
|
FROM gcr.io/distroless/base-debian10
|
2021-04-28 16:55:29 +02:00
|
|
|
|
2021-07-01 11:46:03 +02:00
|
|
|
WORKDIR /opt/focalboard
|
2021-06-07 11:20:32 +02:00
|
|
|
|
2021-07-01 11:46:03 +02:00
|
|
|
COPY --from=nodebuild /webapp/pack pack/
|
|
|
|
COPY --from=gobuild /go/src/focalboard/bin/linux/focalboard-server bin/
|
|
|
|
COPY --from=gobuild /go/src/focalboard/LICENSE.txt LICENSE.txt
|
|
|
|
COPY --from=gobuild /go/src/focalboard/docker/server_config.json config.json
|
2021-03-17 19:07:04 +02:00
|
|
|
|
2021-07-01 11:46:03 +02:00
|
|
|
USER nobody
|
2021-03-17 19:07:04 +02:00
|
|
|
|
2021-07-01 11:46:03 +02:00
|
|
|
EXPOSE 8000/tcp
|
2021-04-28 16:55:29 +02:00
|
|
|
|
2021-07-01 11:46:03 +02:00
|
|
|
EXPOSE 8000/tcp 9092/tcp
|
2021-04-28 16:55:29 +02:00
|
|
|
|
2021-07-01 11:46:03 +02:00
|
|
|
VOLUME /data
|
2021-04-28 16:55:29 +02:00
|
|
|
|
|
|
|
CMD ["/opt/focalboard/bin/focalboard-server"]
|