-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (30 loc) · 819 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
FROM golang:1.16-alpine AS builder
WORKDIR /app
COPY main .
# COPY migrate.linux-amd64 .
# FROM golang:1.16-alpine AS builder
# # Set destination for COPY
# WORKDIR /app
# # Download Go modules
# COPY go.mod .
# RUN go mod download
# # Copy the source code.
# COPY . .
# # Build
# # RUN apk add curl
# # RUN curl -L https://github.com/golang-migrate/migrate/releases/download/v4.12.2/migrate.linux-amd64.tar.gz | tar xvz
# COPY migrate.linux-amd64 .
# RUN CGO_ENABLED=0 GOOS=linux go build -o main main.go
# RUN STAGE
FROM alpine:latest
WORKDIR /app
COPY --from=builder /app/main .
# COPY --from=builder /app/migrate.linux-amd64 ./migrate
COPY app.env .
COPY src/db/migration ./src/db/migration
COPY wait-for.sh .
COPY start.sh .
EXPOSE 8080
EXPOSE 9090
CMD ["/app/main"]
# ENTRYPOINT [ "/app/start.sh"]