forked from ITxPT/DATA4PTTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
22 lines (20 loc) · 813 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM golang:1.17-alpine as builder
RUN apk add libxml2-dev gcc musl-dev nodejs npm
RUN mkdir /greenlight
ADD . /usr/local/greenlight
WORKDIR /usr/local/greenlight
RUN go mod download
RUN go build -o glc cmd/*.go
WORKDIR /usr/local/greenlight/app
ENV NEXT_TELEMETRY_DISABLED=1
RUN npm install
RUN npm run build
FROM golang:1.17-alpine
RUN apk add libxml2
WORKDIR /usr/local/greenlight
COPY --from=builder /usr/local/greenlight/glc /usr/local/greenlight/glc
COPY --from=builder /usr/local/greenlight/xsd /usr/local/greenlight/xsd
COPY --from=builder /usr/local/greenlight/builtin /usr/local/greenlight/builtin
COPY --from=builder /usr/local/greenlight/testdata /usr/local/greenlight/testdata
COPY --from=builder /usr/local/greenlight/app/out /usr/local/greenlight/app/out
ENTRYPOINT ["/usr/local/greenlight/glc"]