mirror of
https://github.com/Luzifer/badge-gen.git
synced 2024-12-30 05:01:18 +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>
|
MAINTAINER Knut Ahlers <knut@ahlers.me>
|
||||||
|
|
||||||
RUN apk --update add wget && \
|
ADD . /go/src/github.com/Luzifer/badge-gen
|
||||||
wget --no-check-certificate https://gobuilder.me/get/github.com/Luzifer/badge-gen/badge-gen_master_linux-386.zip && \
|
WORKDIR /go/src/github.com/Luzifer/badge-gen
|
||||||
unzip badge-gen_master_linux-386.zip
|
|
||||||
|
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
|
EXPOSE 3000
|
||||||
ENTRYPOINT ["/badge-gen/badge-gen"]
|
|
||||||
|
ENTRYPOINT ["/go/bin/badge-gen"]
|
||||||
|
CMD ["--"]
|
||||||
|
|
Loading…
Reference in a new issue