27 lines
No EOL
685 B
Docker
27 lines
No EOL
685 B
Docker
### Builds maddy-hostux-check-password
|
|
FROM docker.io/golang:1.19-alpine AS build-env
|
|
|
|
# Required for mattn/go-sqlite3
|
|
ENV CGO_ENABLED=1
|
|
|
|
RUN set -ex && \
|
|
apk upgrade --no-cache --available && \
|
|
apk add --no-cache build-base gcc musl-dev
|
|
|
|
WORKDIR /maddy-hostux-check-password
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . ./
|
|
|
|
RUN make
|
|
|
|
### Copies maddy-hostux-check-password and maddy.conf to the final image
|
|
FROM docker.io/foxcpp/maddy:0.7.1
|
|
|
|
COPY --from=build-env /maddy-hostux-check-password/build/maddy-hostux-check-password /bin/maddy-hostux-check-password
|
|
|
|
COPY ./maddy.conf.docker /etc/maddy/maddy.conf
|
|
|
|
ENTRYPOINT ["/bin/maddy", "-config", "/etc/maddy/maddy.conf"] |