sqlapi/Dockerfile

30 lines
588 B
Text
Raw Permalink Normal View History

2023-03-25 14:49:30 +00:00
FROM golang:alpine as builder
COPY . /go/src/github.com/Luzifer/sqlapi
WORKDIR /go/src/github.com/Luzifer/sqlapi
2023-03-25 14:49:30 +00:00
RUN set -ex \
&& apk add --update 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/sqlapi /usr/local/bin/sqlapi
2023-03-25 14:49:30 +00:00
EXPOSE 3000
ENTRYPOINT ["/usr/local/bin/sqlapi"]
2023-03-25 14:49:30 +00:00
CMD ["--"]
# vim: set ft=Dockerfile: