2019-12-12 08:37:26 +03:00
|
|
|
FROM golang:1.13
|
2018-06-29 16:09:21 +03:00
|
|
|
|
2018-07-10 13:01:02 +03:00
|
|
|
ARG upx_version="3.94"
|
|
|
|
|
2018-06-29 16:09:21 +03:00
|
|
|
# install go dependencies
|
2019-12-12 08:37:26 +03:00
|
|
|
RUN go get github.com/mitchellh/gox \
|
2018-07-10 13:01:02 +03:00
|
|
|
&& go get github.com/hasura/go-bindata/go-bindata \
|
|
|
|
&& go get github.com/tcnksm/ghr
|
2018-06-29 16:09:21 +03:00
|
|
|
|
2019-09-19 15:54:40 +03:00
|
|
|
# install UPX, netcat and brotli
|
2018-06-29 16:09:21 +03:00
|
|
|
RUN apt-get update && apt-get install -y \
|
2019-09-19 15:54:40 +03:00
|
|
|
xz-utils netcat libpq5 postgresql-client git cmake pkgconf \
|
2018-07-10 13:01:02 +03:00
|
|
|
&& curl -Lo /tmp/upx-${upx_version}.tar.xz https://github.com/upx/upx/releases/download/v${upx_version}/upx-${upx_version}-amd64_linux.tar.xz \
|
|
|
|
&& xz -d -c /tmp/upx-${upx_version}.tar.xz \
|
|
|
|
| tar -xOf - upx-${upx_version}-amd64_linux/upx > /bin/upx \
|
|
|
|
&& chmod a+x /bin/upx \
|
2019-09-19 15:54:40 +03:00
|
|
|
&& git clone https://github.com/google/brotli.git && cd brotli && mkdir out && cd out && ../configure-cmake \
|
|
|
|
&& make && make test && make install && ldconfig \
|
2018-07-03 20:10:13 +03:00
|
|
|
&& apt-get -y auto-remove \
|
2018-08-30 18:54:12 +03:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|