From 8dfa209e083c998cab59a35b0a638536bd4e84af Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Tue, 31 Dec 2024 01:52:36 -0500 Subject: [PATCH] deployment: ajouter Dockerfile pour container applicatif --- deployments/docker/agendas/Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 deployments/docker/agendas/Dockerfile diff --git a/deployments/docker/agendas/Dockerfile b/deployments/docker/agendas/Dockerfile new file mode 100644 index 0000000..e441a93 --- /dev/null +++ b/deployments/docker/agendas/Dockerfile @@ -0,0 +1,23 @@ +FROM golang:1.23 as build + +LABEL author="vlbeaudoin" + +WORKDIR /go/src/app + +COPY LICENSE cmd.go config.go db.go entity.go flag.go go.mod go.sum handler.go main.go server.go ./ + +ADD queries/ queries/ +ADD ui/ ui/ + +RUN CGO_ENABLED=0 go build \ + -a \ + -o agendas \ + ./ + +# Alpine + +FROM alpine:3.20 as run + +COPY --from=build /go/src/app/agendas /usr/bin/agendas + +CMD ["agendas", "help"]