mirror of
https://github.com/Luzifer/badge-gen.git
synced 2024-11-08 13:20:02 +00:00
Update Dockerfile to build binary in container
This commit is contained in:
parent
53d540170f
commit
05f603c56f
1 changed files with 11 additions and 6 deletions
17
Dockerfile
17
Dockerfile
|
@ -1,11 +1,16 @@
|
|||
FROM gliderlabs/alpine:3.1
|
||||
FROM golang:alpine
|
||||
|
||||
MAINTAINER Knut Ahlers <knut@ahlers.me>
|
||||
|
||||
RUN apk --update add wget && \
|
||||
wget --no-check-certificate https://gobuilder.me/get/github.com/Luzifer/badge-gen/badge-gen_master_linux-386.zip && \
|
||||
unzip badge-gen_master_linux-386.zip
|
||||
ADD . /go/src/github.com/Luzifer/badge-gen
|
||||
WORKDIR /go/src/github.com/Luzifer/badge-gen
|
||||
|
||||
RUN set -ex \
|
||||
&& apk add --update git ca-certificates \
|
||||
&& go install -ldflags "-X main.version=$(git describe --tags || git rev-parse --short HEAD || echo dev)" \
|
||||
&& apk del --purge git
|
||||
|
||||
ENV PORT 3000
|
||||
EXPOSE 3000
|
||||
ENTRYPOINT ["/badge-gen/badge-gen"]
|
||||
|
||||
ENTRYPOINT ["/go/bin/badge-gen"]
|
||||
CMD ["--"]
|
||||
|
|
Loading…
Reference in a new issue