2021-03-17 18:09:03 +03:00
|
|
|
FROM golang:1.16
|
2018-06-29 16:09:21 +03:00
|
|
|
|
2020-11-12 12:25:48 +03:00
|
|
|
ARG upx_version="3.96"
|
2018-07-10 13:01:02 +03:00
|
|
|
|
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/tcnksm/ghr
|
2018-06-29 16:09:21 +03:00
|
|
|
|
2021-03-17 18:09:03 +03:00
|
|
|
# install UPX, netcat and gcloud cli
|
2018-06-29 16:09:21 +03:00
|
|
|
RUN apt-get update && apt-get install -y \
|
2021-03-17 18:09:03 +03:00
|
|
|
xz-utils netcat libpq5 postgresql-client jq zip \
|
2021-02-23 20:37:27 +03:00
|
|
|
&& curl -s https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list \
|
|
|
|
&& curl -s https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
|
2021-03-17 18:09:03 +03:00
|
|
|
&& echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
|
|
|
|
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \
|
2021-02-23 20:37:27 +03:00
|
|
|
&& apt-get update \
|
2021-03-17 18:09:03 +03:00
|
|
|
&& ACCEPT_EULA=Y apt-get install -y ca-certificates libkrb5-3 libpq5 libnuma1 unixodbc-dev msodbcsql17 apt-transport-https gnupg google-cloud-sdk hub \
|
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 \
|
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/*
|