balena-supervisor/gosuper/Dockerfile
Petros Angelatos ca91fd179b compress gosuper with upx
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-09-14 01:38:37 +00:00

25 lines
464 B
Docker

# Build golang supervisor
FROM golang:1.6
RUN apt-get update \
&& apt-get install -y \
rsync \
upx-ucl \
&& rm -rf /var/lib/apt/lists/
COPY . /go/src/resin-supervisor/gosuper
WORKDIR /go/src/resin-supervisor/gosuper
ENV GOOS linux
ARG GOARCH=amd64
ARG GOARM=''
RUN go install -a -v ./gosuper \
&& cd /go/bin \
&& find -type f -name gosuper -exec mv {} /go/bin/gosuper \; \
&& upx --best /go/bin/gosuper
CMD rsync -a --delete /go/bin/gosuper /build