質問編集履歴

1

Dockerfileの掲載ミス

2020/03/22 01:47

投稿

tetsuya28
tetsuya28

スコア5

test CHANGED
File without changes
test CHANGED
@@ -16,37 +16,19 @@
16
16
 
17
17
  ```
18
18
 
19
- FROM golang:1.13.0 as builder
19
+ FROM golang:1.13.0
20
20
 
21
21
 
22
22
 
23
- WORKDIR /go/src/***
23
+ WORKDIR /go/src/***/
24
24
 
25
25
 
26
26
 
27
- ADD go.mod .
27
+ RUN go get github.com/oxequa/realize
28
28
 
29
- ADD go.sum .
29
+ ADD .realize.yaml .
30
30
 
31
- RUN go mod download
32
-
33
-
34
-
35
- ADD ./ .
36
-
37
- RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o main -ldflags '-extldflags "-static"' ./cmd/api/main.go
38
-
39
-
40
-
41
- # マルチステージビルド
42
-
43
- FROM alpine:latest
44
-
45
- WORKDIR /***
46
-
47
- COPY --from=builder /go/src/***/main .
48
-
49
- CMD ["./main"]
31
+ CMD ["realize", "start"]
50
32
 
51
33
  ```
52
34