restis/Dockerfile
Knut Ahlers 4b9090edd8
Initial version
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2022-12-27 18:16:50 +01:00

33 lines
590 B
Docker

FROM golang:alpine as builder
COPY . /src/restis
WORKDIR /src/restis
ENV CGO_ENABLED=0
RUN set -ex \
&& apk add --update \
build-base \
git \
&& go install \
-ldflags "-X main.version=$(git describe --tags --always || echo dev)" \
-mod=readonly \
-modcacherw \
-trimpath
FROM alpine:latest
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
RUN set -ex \
&& apk --no-cache add \
ca-certificates
COPY --from=builder /go/bin/restis /usr/local/bin/restis
EXPOSE 3000
ENTRYPOINT ["/usr/local/bin/restis"]
CMD ["--"]
# vim: set ft=Dockerfile: