-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (29 loc) · 866 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
34
35
36
37
38
39
40
41
42
43
44
45
FROM node:16-alpine AS frontend-builder
RUN mkdir /app
WORKDIR /app
COPY webui/package.json .
COPY webui/package-lock.json .
RUN npm ci
COPY webui .
RUN npx next build
RUN npx next export
###############
FROM golang:1.16 AS server-builder
WORKDIR /app
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY cli cli
COPY cmd cmd
COPY lib lib
COPY server server
RUN CGO_ENABLED=0 GOOS=linux go build -tags production -o sqedule-server -ldflags '-w -s' -a -installsuffix cgo ./cmd/server
###############
FROM alpine:3.14
LABEL maintainer="Fullstaq"
LABEL org.opencontainers.image.source=https://github.com/fullstaq-labs/sqedule
COPY --from=frontend-builder /app/out webui-assets
COPY --from=server-builder /app/sqedule-server .
EXPOSE 3001
# Using entrypoint so we can use commands in docker compose. Rather than using CMD
ENTRYPOINT ["./sqedule-server"]