mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-19 13:47:54 +00:00
ca91fd179b
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
25 lines
464 B
Docker
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
|