diff --git a/Dockerfile b/Dockerfile index b4eac1da..52b26bfc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,8 @@ FROM golang:1.9-alpine -ENV PORT_NUM 9200 WORKDIR /go/src/github.com/abutaha/aws-es-proxy COPY . . -#RUN go-wrapper download -#RUN go-wrapper install - RUN apk add --update bash curl git && \ rm /var/cache/apk/* @@ -14,8 +10,19 @@ RUN mkdir -p $$GOPATH/bin && \ curl https://glide.sh/get | sh RUN glide install -RUN go build -o aws-es-proxy +RUN CGO_ENABLED=0 GOOS=linux go build -o aws-es-proxy + +FROM alpine:3.7 +LABEL name="aws-es-proxy" \ + version="latest" + +RUN apk --no-cache add ca-certificates +WORKDIR /home/ +COPY --from=0 /go/src/github.com/abutaha/aws-es-proxy/aws-es-proxy /usr/local/bin/ + +ENV PORT_NUM 9200 EXPOSE ${PORT_NUM} -CMD ["./aws-es-proxy", "-h"] +ENTRYPOINT ["aws-es-proxy"] +CMD ["-h"]