2022-11-14 07:02:23 +01:00
|
|
|
FROM ubuntu:20.04 as tool_builder
|
|
|
|
ENV TZ=Asia/Shanghai \
|
|
|
|
DEBIAN_FRONTEND=noninteractive
|
2021-03-17 15:33:02 +01:00
|
|
|
ENV LANG C.UTF-8
|
|
|
|
WORKDIR /tool
|
|
|
|
|
|
|
|
#RUN tdnf install -y \
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
build-essential \
|
|
|
|
wget \
|
|
|
|
git \
|
|
|
|
tar \
|
|
|
|
#go
|
|
|
|
#ubuntu
|
|
|
|
curl \
|
|
|
|
libssl-dev \
|
|
|
|
uuid-dev
|
|
|
|
#ubuntu
|
|
|
|
RUN apt-get update && apt-get install -y software-properties-common && \
|
|
|
|
add-apt-repository -y ppa:longsleep/golang-backports && \
|
|
|
|
apt-get install -y golang-go
|
|
|
|
|
|
|
|
RUN pwd && mkdir /tool/binary && \
|
|
|
|
# Install CONTAINERD
|
2022-11-14 07:02:23 +01:00
|
|
|
CONTAINERD_VERSION=1.6.9 && \
|
2021-03-17 15:33:02 +01:00
|
|
|
wget https://github.com/containerd/containerd/releases/download/v$CONTAINERD_VERSION/containerd-$CONTAINERD_VERSION-linux-amd64.tar.gz && \
|
|
|
|
tar zxvf containerd-$CONTAINERD_VERSION-linux-amd64.tar.gz && \
|
|
|
|
cd bin && cp -f containerd ctr /tool/binary/ && \
|
|
|
|
# docker compose
|
2022-11-14 07:02:23 +01:00
|
|
|
curl -L "https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-$(uname -s)-$(uname -m)" -o /tool/binary/docker-compose && \
|
2021-03-17 15:33:02 +01:00
|
|
|
chmod +x /tool/binary/docker-compose && \
|
|
|
|
# Install helm v2
|
|
|
|
HELM2_VERSION=2.16.12 && wget https://get.helm.sh/helm-v$HELM2_VERSION-linux-amd64.tar.gz && \
|
|
|
|
tar zxvf helm-v$HELM2_VERSION-linux-amd64.tar.gz && \
|
|
|
|
cp linux-amd64/helm /tool/binary/helm && \
|
|
|
|
cp linux-amd64/helm /tool/binary/helm2 && \
|
|
|
|
# Install helm v3
|
|
|
|
HELM3_VERSION=3.3.3 && wget https://get.helm.sh/helm-v$HELM3_VERSION-linux-amd64.tar.gz && \
|
|
|
|
tar zxvf helm-v$HELM3_VERSION-linux-amd64.tar.gz && \
|
|
|
|
ls || pwd && \
|
|
|
|
mv linux-amd64/helm /tool/binary/helm3 && \
|
2022-11-14 07:02:23 +01:00
|
|
|
# Install helm v3.10
|
|
|
|
HELM3_10_VERSION=3.10.1 && wget https://get.helm.sh/helm-v$HELM3_10_VERSION-linux-amd64.tar.gz && \
|
|
|
|
tar zxvf helm-v$HELM3_10_VERSION-linux-amd64.tar.gz && \
|
2021-10-26 11:27:45 +02:00
|
|
|
ls || pwd && \
|
|
|
|
mv linux-amd64/helm /tool/binary/helm3.7 && \
|
2021-03-17 15:33:02 +01:00
|
|
|
# Install ORAS
|
2022-11-14 07:02:23 +01:00
|
|
|
ORAS_VERSION=0.16.0 && curl -LO https://github.com/deislabs/oras/releases/download/v$ORAS_VERSION/oras_${ORAS_VERSION}_linux_amd64.tar.gz && \
|
2021-03-17 15:33:02 +01:00
|
|
|
mkdir -p oras-install/ && \
|
|
|
|
tar -zxf oras_${ORAS_VERSION}_*.tar.gz -C oras-install/ && \
|
|
|
|
mv oras-install/oras /tool/binary/ && \
|
|
|
|
# Install notary
|
|
|
|
NOTARY_VERSION=0.6.1 && wget https://github.com/theupdateframework/notary/releases/download/v$NOTARY_VERSION/notary-Linux-amd64 && \
|
|
|
|
chmod +x notary-Linux-amd64 && \
|
|
|
|
mv notary-Linux-amd64 /tool/binary/notary && \
|
|
|
|
# Install CNAB
|
|
|
|
CNAB_PATH=$(go env GOPATH)/src/github.com/cnabio && \
|
|
|
|
mkdir -p $CNAB_PATH && cd $CNAB_PATH && git clone https://github.com/cnabio/cnab-to-oci.git && \
|
2022-11-14 07:02:23 +01:00
|
|
|
cd cnab-to-oci && git checkout v0.3.7 && \
|
2021-03-17 15:33:02 +01:00
|
|
|
go list && \
|
|
|
|
make build && \
|
|
|
|
mv bin/cnab-to-oci /tool/binary/ && \
|
|
|
|
# Install DIND
|
|
|
|
DIND_COMMIT=3b5fac462d21ca164b3778647420016315289034 && \
|
|
|
|
wget "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind" -O /tool/binary/dind \
|
|
|
|
&& chmod +x /tool/binary/dind && \
|
2022-06-20 08:32:15 +02:00
|
|
|
# Install wasm-to-oci
|
2021-10-28 10:09:13 +02:00
|
|
|
WASM_TO_OCI_VERSION=0.1.2 && wget https://github.com/engineerd/wasm-to-oci/releases/download/v${WASM_TO_OCI_VERSION}/linux-amd64-wasm-to-oci && \
|
|
|
|
chmod +x linux-amd64-wasm-to-oci && mv linux-amd64-wasm-to-oci /tool/binary/wasm-to-oci && \
|
2021-11-01 04:27:52 +01:00
|
|
|
# Install imgpkg
|
2022-11-14 07:02:23 +01:00
|
|
|
IMGPKG_VERSION=0.33.0 && wget https://github.com/vmware-tanzu/carvel-imgpkg/releases/download/v$IMGPKG_VERSION/imgpkg-linux-amd64 && \
|
2021-11-01 04:27:52 +01:00
|
|
|
mv imgpkg-linux-amd64 /tool/binary/imgpkg && chmod +x /tool/binary/imgpkg && \
|
2022-01-17 08:40:49 +01:00
|
|
|
# Install cosign
|
2022-11-14 07:02:23 +01:00
|
|
|
COSIGN_VERSION=1.13.1 && wget https://github.com/sigstore/cosign/releases/download/v$COSIGN_VERSION/cosign-linux-amd64 && \
|
2022-01-17 08:40:49 +01:00
|
|
|
mv cosign-linux-amd64 /tool/binary/cosign && chmod +x /tool/binary/cosign && \
|
2021-03-17 15:33:02 +01:00
|
|
|
pwd
|
|
|
|
|
|
|
|
RUN cd /tool/binary/ && tar czvf tools.tar.gz * && cp tools.tar.gz /tool
|
2022-06-20 08:32:15 +02:00
|
|
|
# --- End of base file ---
|