mirror of
https://github.com/Luzifer/go-latestver.git
synced 2024-12-20 10:31:16 +00:00
Add dockerized version
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
29b17f4b7d
commit
deb8c38857
1 changed files with 36 additions and 0 deletions
36
Dockerfile
Normal file
36
Dockerfile
Normal file
|
@ -0,0 +1,36 @@
|
|||
FROM golang:alpine as builder
|
||||
|
||||
COPY . /go/src/github.com/Luzifer/go-latestver
|
||||
WORKDIR /go/src/github.com/Luzifer/go-latestver
|
||||
|
||||
RUN set -ex \
|
||||
&& apk add --update \
|
||||
build-base \
|
||||
git \
|
||||
make \
|
||||
nodejs \
|
||||
npm \
|
||||
sqlite-dev \
|
||||
&& make build \
|
||||
&& go install \
|
||||
-ldflags "-X main.version=$(git describe --tags --always || echo dev)" \
|
||||
-mod=readonly
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
|
||||
|
||||
RUN set -ex \
|
||||
&& apk --no-cache add \
|
||||
ca-certificates \
|
||||
sqlite
|
||||
|
||||
COPY --from=builder /go/bin/go-latestver /usr/local/bin/go-latestver
|
||||
|
||||
EXPOSE 3000
|
||||
VOLUME ["/data"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/go-latestver"]
|
||||
CMD ["--"]
|
||||
|
||||
# vim: set ft=Dockerfile:
|
Loading…
Reference in a new issue