Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: download restic in zip format instead of using git clone #923

Merged
merged 1 commit into from
Jul 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ RUN curl -L https://api.github.com/repos/che-incubator/devworkspace-che-operator

# Build restic. Needed for backup / restore capabilities
ENV RESTIC_TAG=v0.12.0
RUN mkdir -p $GOPATH && cd $GOPATH && \
git clone --depth 1 --branch $RESTIC_TAG https://github.com/restic/restic.git && \
cd restic && \
RUN mkdir -p $GOPATH/restic && cd $GOPATH/restic && \
curl -L https://api.github.com/repos/restic/restic/zipball/${RESTIC_TAG} > /tmp/restic.zip && \
unzip /tmp/restic.zip -d /tmp && \
mv /tmp/restic-*/* $GOPATH/restic && \
export ARCH="$(uname -m)" && if [[ ${ARCH} == "x86_64" ]]; then export ARCH="amd64"; elif [[ ${ARCH} == "aarch64" ]]; then export ARCH="arm64"; fi && \
go mod vendor && \
GOOS=linux GOARCH=${ARCH} CGO_ENABLED=0 go build -mod=vendor -o /tmp/restic/restic ./cmd/restic
Expand Down