forked from cuducos/minha-receita
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
22 lines (20 loc) · 623 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM golang:1.17-bullseye as build
WORKDIR /minha-receita
ADD go.* ./
ADD main.go .
ADD api/ ./api/
ADD cmd/ ./cmd/
ADD db/ ./db/
ADD download/ ./download/
ADD testdata/ ./testdata/
ADD transform/ ./transform/
RUN go get && go test ./... && go build -o /usr/bin/minha-receita
FROM debian:bullseye-slim
RUN apt-get update && \
apt-get install -y --no-install-recommends postgresql-client ca-certificates && \
update-ca-certificates && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
COPY --from=build /usr/bin/minha-receita /usr/bin/minha-receita
ENTRYPOINT ["/usr/bin/minha-receita"]
CMD ["api"]