Skip to content

Commit c16972b

Browse files
committed
Add basic go file && Dockerfile
1 parent b738f58 commit c16972b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ COPY . .
1212
# RUN go build
1313
# Build
1414
# RUN CGO_ENABLED=0 GOOS=linux go build -o main .
15-
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
15+
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o FN-Go-Basic-Services .
1616

1717
FROM alpine:latest as runtime
1818
RUN apk --no-cache add ca-certificates
1919
WORKDIR /root/
2020

21-
COPY --from=builder /app/app .
21+
COPY --from=builder /app/FN-Go-Basic-Services .
2222
# COPY . FN-Go-Basic-Services
2323

24-
CMD ["./app"]
24+
CMD ["./FN-Go-Basic-Services"]
2525

2626
# Optional:
2727
# To bind to a TCP port, runtime parameters must be supplied to the docker command.

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func main() {
2020
})
2121

2222
e.GET("/health", func(c echo.Context) error {
23-
return c.String(http.StatusOK, "Health is OK!!")
23+
return c.String(http.StatusOK, "Health is OK1234!!")
2424
})
2525

2626
httpPort := os.Getenv("PORT")

0 commit comments

Comments
 (0)