This commit is contained in:
17
Dockerfile
17
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
|
||||
|
||||
|
Reference in New Issue
Block a user