File tree 2 files changed +44
-0
lines changed
2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ bin /
2
+ vendor /
Original file line number Diff line number Diff line change
1
+ # ######
2
+ # ###### Build the backend
3
+ # ######
4
+
5
+ # Base build image
6
+ FROM golang:1.11 AS build_base
7
+
8
+ WORKDIR /agola
9
+
10
+ # use go modules
11
+ ENV GO111MODULE=on
12
+
13
+ # Only copy go.mod and go.sum
14
+ COPY go.mod .
15
+ COPY go.sum .
16
+
17
+ RUN go mod download
18
+
19
+ # This image builds the weavaite server
20
+ FROM build_base AS server_builder
21
+
22
+ # Copy all the source
23
+ COPY . .
24
+
25
+ # Copy the agola-web dist
26
+ COPY --from=agola-web /agola-web/dist/ /agola-web/dist/
27
+
28
+ RUN make WEBBUNDLE=1 WEBDISTPATH=/agola-web/dist
29
+ # RUN go build -tags "sqlite_unlock_notify webbundle" -o /go/bin/agola ./cmd/agola
30
+ # RUN CGO_ENABLED=0 go build -tags "sqlite_unlock_notify webbundle" -o /go/bin/agola-toolbox ./cmd/toolbox
31
+
32
+
33
+ # ######
34
+ # ###### Build the final image
35
+ # ######
36
+ FROM debian:stable
37
+
38
+ WORKDIR /go/src/github.com/sorintlab/agola
39
+
40
+ # Finally we copy the statically compiled Go binary.
41
+ COPY --from=server_builder /agola/bin/agola /agola/bin/agola-toolbox /bin/
42
+ ENTRYPOINT ["/bin/agola" ]
You can’t perform that action at this time.
0 commit comments