mirror of
https://git.netzspielplatz.de/docker-multiarch/prosody-filer.git
synced 2025-11-08 14:19:27 +00:00
14 lines
631 B
Docker
14 lines
631 B
Docker
# build stage
|
|
FROM golang:alpine AS build-env
|
|
RUN apk --no-cache add build-base git gcc
|
|
RUN cd /tmp; git clone https://github.com/ThomasLeister/prosody-filer.git
|
|
RUN cd /tmp/prosody-filer; \
|
|
VERSIONSTRING="$(git describe --tags --exact-match 2> /dev/null || git rev-parse --short HEAD)"; \
|
|
echo "Building version ${VERSIONSTRING} of Prosody-Filer ..."; \
|
|
CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-extldflags '-static' -w -s -X main.versionString=${VERSIONSTRING}" prosody-filer.go;
|
|
|
|
# final stage
|
|
FROM alpine
|
|
WORKDIR /app
|
|
COPY --from=build-env /tmp/prosody-filer/prosody-filer /app/
|
|
ENTRYPOINT /app/prosody-filer
|