-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerfile
33 lines (28 loc) · 773 Bytes
/
dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Build Stage 1
# Compile frontend component
#
FROM node:alpine3.10 AS appbuild1
RUN apk add g++ make python
WORKDIR /usr/src/app
COPY . .
RUN npm ci
RUN npm run build
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
USER appuser
# Build Stage 2
# Compile backend component
#
FROM golang:alpine as appbuild2
RUN go install github.com/magefile/mage@latest
WORKDIR /usr/src/app
COPY . .
RUN go get -u github.com/grafana/grafana-plugin-sdk-go
RUN go mod tidy
RUN mage -v
# base grafana image
FROM grafana/grafana:8.3.0-beta2
ENV GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=aveva-sds-datasource
WORKDIR /var/lib/grafana/plugins/aveva-data-hub-sample
COPY --from=appbuild1 /usr/src/app/dist ./dist
COPY --from=appbuild2 /usr/src/app/dist ./dist
COPY package.json .