1
0
Fork 0
mirror of https://github.com/Luzifer/badge-gen.git synced 2024-12-20 16:41:16 +00:00

Update Dockerfile to build binary in container

This commit is contained in:
Knut Ahlers 2016-06-28 19:40:45 +02:00
parent 53d540170f
commit 05f603c56f
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -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 ["--"]