-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (20 loc) · 1.16 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM golang
RUN mkdir /build
COPY . /build/
WORKDIR /build
RUN go build
# TODO: multiarch
FROM ubuntu
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -y -qq update && \
apt-get install -y -qq wget jq curl git gnupg software-properties-common rsync && \
apt-get clean
# set a fixed version of gh CLI because the output format sometimes has breaking changes
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0 && \
apt-add-repository https://cli.github.com/packages && \
apt update && \
apt install gh=1.10.0 && apt-get clean
RUN wget "https://storage.googleapis.com/kubernetes-release/release/$(wget -O- https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" && install kubectl /usr/local/bin/
RUN wget "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv3.8.8/kustomize_v3.8.8_linux_amd64.tar.gz" -O k.tar.gz && tar -xvzf k.tar.gz && install kustomize /usr/local/bin && rm k.tar.gz
RUN wget "https://github.com/benjvi/yshard/releases/download/0.0.1/yshard-linux-amd64" -O yshard && install yshard /usr/local/bin
COPY --from=0 --chmod=777 /build/prify /usr/local/bin/prify