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
|
FROM alpine:3.7
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN go mod init \
|
# Copy the binary and required files
|
||||||
&& GOOS=linux go build -o docker-ldap-change-password-web-ui main.go
|
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 static /app/static
|
||||||
ADD templates /app/templates
|
ADD templates /app/templates
|
||||||
RUN chmod +x /app/docker-ldap-change-password-web-ui
|
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user