1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-11-30 08:36:54 +02:00
focalboard/Dockerfile.build
Carlos Tadeu Panato Junior 36acff4476
Add GitLab ci to build internally and bump go to 1.16 (#468)
* update go to 1.16

* add gitlab ci to build focalboard
2021-05-26 12:34:42 +02:00

34 lines
962 B
Docker

# This dockerfile is used to build Focalboard for Linux
# it builds all the parts inside the container and the last stage just holds the
# package that can be extracted using docker cp command
# ie
# docker build -f Dockerfile.build --no-cache -t focalboard-build:dirty .
# docker run --rm -v /tmp/dist:/tmp -d --name test focalboard-build:dirty /bin/sh -c 'sleep 1000'
# docker cp test:/dist/focalboard-server-linux-amd64.tar.gz .
# build frontend
FROM node:16.1.0 AS frontend
WORKDIR /webapp
COPY webapp .
RUN npm install --no-optional
RUN npm run pack
# build backend and package
FROM golang:1.16.4 AS backend
COPY . .
COPY --from=frontend /webapp/pack webapp/pack
# RUN apt-get update && apt-get install libgtk-3-dev libwebkit2gtk-4.0-dev -y
RUN make server-linux
RUN make server-linux-package-docker
# just hold the packages to output later
FROM alpine:3.12 AS dist
WORKDIR /dist
COPY --from=backend /go/dist/focalboard-server-linux-amd64.tar.gz .