File tree Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Helm chart folder
2
+ chart
3
+
4
+ # Git repo
5
+ .git
Original file line number Diff line number Diff line change
1
+ # ##Go###
2
+
3
+ # Compiled Object files, Static and Dynamic libs (Shared Objects)
4
+ * .o
5
+ * .a
6
+ * .so
7
+
8
+ # Folders
9
+ _obj
10
+ _test
11
+
12
+ # Architecture specific extensions/prefixes
13
+ * . [568vq ]
14
+ [568vq ].out
15
+
16
+ * .cgo1.go
17
+ * .cgo2.c
18
+ _cgo_defun.c
19
+ _cgo_gotypes.go
20
+ _cgo_export. *
21
+
22
+ _testmain.go
23
+
24
+ * .exe
25
+ * .test
26
+ * .prof
27
+
28
+ # Helm chart folder
29
+ chart
Original file line number Diff line number Diff line change
1
+ # base image
2
+ FROM golang:1.22.5-alpine AS builder
3
+ RUN adduser -D -g '' elf
4
+ WORKDIR /opt/app/
5
+ COPY go.mod go.sum ./
6
+ RUN go mod download && \
7
+ go mod verify
8
+ COPY . .
9
+
10
+ RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-w -s" -a -installsuffix cgo -o /go/bin/cinema-movies ./cmd/app
11
+
12
+ # build a small image
13
+ FROM alpine:3.17.3
14
+ LABEL language="golang"
15
+ LABEL org.opencontainers.image.source https://github.com/mikebellcoder/microservices-docker-go-mongodb
16
+ COPY --from=builder /etc/passwd /etc/passwd
17
+ COPY --from=builder --chown=elf:1000 /go/bin/cinema-movies /cinema
18
+ USER elf
19
+ ENTRYPOINT ["./cinema-movies" ]
You can’t perform that action at this time.
0 commit comments