2016-09-21 00:46:16 -04:00
|
|
|
FROM alpine:latest
|
|
|
|
MAINTAINER Jessica Frazelle <jess@linux.com>
|
2016-08-13 01:23:13 -04:00
|
|
|
|
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
|
|
ENV GOPATH /go
|
|
|
|
|
2016-09-21 00:46:16 -04:00
|
|
|
RUN apk add --no-cache \
|
|
|
|
ca-certificates
|
2016-08-13 01:23:13 -04:00
|
|
|
|
2016-09-21 02:33:19 -04:00
|
|
|
COPY . /go/src/github.com/jfrazelle/reg
|
2016-08-13 01:23:13 -04:00
|
|
|
|
2016-09-21 00:46:16 -04:00
|
|
|
RUN set -x \
|
|
|
|
&& apk add --no-cache --virtual .build-deps \
|
2016-08-13 01:23:13 -04:00
|
|
|
go \
|
|
|
|
git \
|
|
|
|
gcc \
|
|
|
|
libc-dev \
|
|
|
|
libgcc \
|
2016-09-21 02:33:19 -04:00
|
|
|
&& cd /go/src/github.com/jfrazelle/reg \
|
2016-08-13 01:23:13 -04:00
|
|
|
&& go build -o /usr/bin/reg . \
|
2016-09-21 00:46:16 -04:00
|
|
|
&& apk del .build-deps \
|
2016-08-13 01:23:13 -04:00
|
|
|
&& rm -rf /go \
|
|
|
|
&& echo "Build complete."
|
|
|
|
|
|
|
|
|
|
|
|
ENTRYPOINT [ "reg" ]
|