24 lines
604 B
Docker
24 lines
604 B
Docker
# build
|
|
FROM golang:1-alpine AS build
|
|
WORKDIR /alps
|
|
|
|
RUN apk add --no-cache git && \
|
|
git clone https://git.sr.ht/~migadu/alps . && \
|
|
CGO_ENABLED=0 go build -tags netgo -v -a -ldflags '-extldflags "-static"' -o "alps" cmd/alps/main.go
|
|
|
|
# release
|
|
FROM alpine:3 AS release
|
|
WORKDIR /
|
|
|
|
COPY --from=build ./alps/alps ./alps
|
|
COPY --from=build ./alps/themes/ ./themes
|
|
COPY --from=build ./alps/plugins/ ./plugins
|
|
COPY ./init ./init
|
|
|
|
LABEL org.opencontainers.image.source=https://git.nemunai.re/nemunaire/docker-alps
|
|
|
|
EXPOSE 1323
|
|
|
|
HEALTHCHECK CMD wget --spider http://127.0.0.1:1323/
|
|
|
|
ENTRYPOINT ["/init"]
|