-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (28 loc) · 806 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
46
47
FROM golang:1.23.4
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY . .
RUN go build -v -o main ./cmd/blogo
EXPOSE 8080
CMD ["/app/main"]
# CMD ["/app/main","--cfg","./config/config.json"]
# FROM golang:alpine as builder
# LABEL maintainer="Pooulad <poooooladi@gmail.com>"
# RUN apk update && apk add --no-cache git
# WORKDIR /app
# COPY go.mod go.sum ./
# RUN go mod download
# COPY . .
# WORKDIR /app/cmd/blogo
# RUN go build -o /app/blogo .
# FROM alpine:latest
# RUN apk --no-cache add ca-certificates
# WORKDIR /root/
# COPY --from=builder /app/blogo .
# COPY --from=builder /app/.env .
# COPY --from=builder /app/config/config.json .
# COPY check-db.sh /root/check-db.sh
# RUN chmod +x /root/check-db.sh
# EXPOSE 8080
# CMD ["/root/check-db.sh"]