From ee22938742d1480e7e542f8682e147298abdfcb2 Mon Sep 17 00:00:00 2001 From: stuzer05 Date: Sun, 12 Jan 2025 15:33:46 +0200 Subject: [PATCH] Commit --- Dockerfile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index b34e5fe..2a4cd11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,23 @@ +FROM golang:1.23.2 AS builder + +WORKDIR /app + +COPY . . + +RUN go mod download && go mod verify + +RUN make + FROM alpine:3.7 WORKDIR /app -RUN go mod init \ - && GOOS=linux go build -o docker-ldap-change-password-web-ui main.go +# Copy the binary and required files +COPY --from=builder /app/docker-ldap-change-password-web-ui /app/docker-ldap-change-password-web-ui +RUN chmod +x /app/docker-ldap-change-password-web-ui -ADD docker-ldap-change-password-web-ui /app/docker-ldap-change-password-web-ui ADD static /app/static ADD templates /app/templates -RUN chmod +x /app/docker-ldap-change-password-web-ui EXPOSE 8080