mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-29 03:57:56 +01:00
80 lines
3.0 KiB
Docker
80 lines
3.0 KiB
Docker
|
FROM ubuntu:18.04 as tool_builder
|
||
|
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
|
||
|
CONTAINERD_VERSION=1.4.4 && \
|
||
|
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
|
||
|
curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /tool/binary/docker-compose && \
|
||
|
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 && \
|
||
|
# Install ORAS
|
||
|
ORAS_VERSION=0.9.0 && curl -LO https://github.com/deislabs/oras/releases/download/v$ORAS_VERSION/oras_${ORAS_VERSION}_linux_amd64.tar.gz && \
|
||
|
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 && \
|
||
|
cd cnab-to-oci && git checkout v0.3.1-beta1 && \
|
||
|
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 && \
|
||
|
pwd
|
||
|
|
||
|
#ubuntu
|
||
|
RUN wget https://github.com/sylabs/singularity/releases/download/v3.3.0/singularity-3.3.0.tar.gz && \
|
||
|
tar -xzf singularity-3.3.0.tar.gz && \
|
||
|
cd singularity && \
|
||
|
./mconfig && \
|
||
|
make -C builddir && \
|
||
|
make -C builddir install
|
||
|
RUN pwd && \
|
||
|
ls -l /usr/local/bin && \
|
||
|
rm -rf singularity && \
|
||
|
mv /usr/local/bin/singularity /tool/binary/
|
||
|
|
||
|
RUN cd /tool/binary/ && tar czvf tools.tar.gz * && cp tools.tar.gz /tool
|
||
|
# --- End of base file ---
|
||
|
|
||
|
|
||
|
|
||
|
|