2016-06-03 17:21:46 +00:00
|
|
|
# Build golang supervisor
|
2016-07-05 18:07:22 -07:00
|
|
|
FROM golang:1.6
|
2015-07-31 17:17:57 +00:00
|
|
|
|
2016-06-03 17:21:46 +00:00
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y \
|
|
|
|
rsync \
|
2016-07-06 02:29:16 -07:00
|
|
|
upx-ucl \
|
2016-06-03 17:21:46 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/
|
|
|
|
|
|
|
|
COPY . /go/src/resin-supervisor/gosuper
|
2015-07-31 17:17:57 +00:00
|
|
|
|
2016-06-03 17:21:46 +00:00
|
|
|
WORKDIR /go/src/resin-supervisor/gosuper
|
|
|
|
|
|
|
|
ENV GOOS linux
|
2015-07-31 17:17:57 +00:00
|
|
|
|
2016-06-03 17:21:46 +00:00
|
|
|
ARG GOARCH=amd64
|
|
|
|
ARG GOARM=''
|
2015-07-31 17:17:57 +00:00
|
|
|
|
2016-06-03 17:21:46 +00:00
|
|
|
RUN go install -a -v ./gosuper \
|
|
|
|
&& cd /go/bin \
|
2016-07-06 02:29:16 -07:00
|
|
|
&& find -type f -name gosuper -exec mv {} /go/bin/gosuper \; \
|
|
|
|
&& upx --best /go/bin/gosuper
|
2015-07-31 17:17:57 +00:00
|
|
|
|
2016-06-03 17:21:46 +00:00
|
|
|
CMD rsync -a --delete /go/bin/gosuper /build
|