mirror of
https://github.com/Luzifer/restis.git
synced 2024-12-21 10:51:18 +00:00
34 lines
590 B
Text
34 lines
590 B
Text
|
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:
|