2021-07-01 11:46:03 +02:00
|
|
|
### Webapp build
|
2022-03-18 19:57:26 +02:00
|
|
|
FROM node:16.3.0@sha256:ca6daf1543242acb0ca59ff425509eab7defb9452f6ae07c156893db06c7a9a4 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
|
2022-06-06 10:18:21 +02:00
|
|
|
FROM golang:1.18.3@sha256:b203dc573d81da7b3176264bfa447bd7c10c9347689be40540381838d75eebef 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-07-20 15:01:02 +02:00
|
|
|
RUN mkdir /data
|
2021-04-28 16:55:29 +02:00
|
|
|
|
2021-07-01 11:46:03 +02:00
|
|
|
## Final image
|
2022-03-18 19:57:26 +02:00
|
|
|
FROM gcr.io/distroless/base-debian10@sha256:d2ce069a83a6407e98c7e0844f4172565f439dab683157bf93b6de20c5b46155
|
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-20 15:01:02 +02:00
|
|
|
COPY --from=gobuild --chown=nobody:nobody /data /data
|
|
|
|
COPY --from=nodebuild --chown=nobody:nobody /webapp/pack pack/
|
|
|
|
COPY --from=gobuild --chown=nobody:nobody /go/src/focalboard/bin/linux/focalboard-server bin/
|
|
|
|
COPY --from=gobuild --chown=nobody:nobody /go/src/focalboard/LICENSE.txt LICENSE.txt
|
|
|
|
COPY --from=gobuild --chown=nobody:nobody /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"]
|