BCDevOps / backup-container

A simple container for a simple backup strategy.
Apache License 2.0
39 stars 56 forks source link

Update Docker file from ADD to RUN curl, build issue #46

Closed chrismajewski closed 4 years ago

chrismajewski commented 4 years ago

Clean version of suggested https://github.com/BCDevOps/backup-container/pull/45

Resolves the following issue:

STEP 7: ARG GOCROND_VERSION=0.6.3
e55ddcc18af7ee9b5dea5822e3b9172f85bcee5eef6afb272e09d61d2013cdb8
STEP 8: ADD https://github.com/$SOURCE_REPO/go-crond/releases/download/$GOCROND_VERSION/go-crond-64-linux /usr/bin/go-crond
error: build error: error building at STEP "ADD https://github.com/$SOURCE_REPO/go-crond/releases/download/$GOCROND_VERSION/go-crond-64-linux /usr/bin/go-crond": source can't be a URL for COPY

Best practices may have changed, they currently suggest curl: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#add-or-copy

I also had to move this operation, installing go-crond, after switching to ROOT so that curl had the permissions required to write to /usr/bin/

chrismajewski commented 4 years ago

I've tested this by blowing away the entire deployment and repeating init through genBuild.sh a handful of times.

Pod backup-1-build consistently builds without issue now.