datatogether / coverage

Project for visualizing the status of digital data archiving efforts across various data repositories
http://api.archivers.co/coverage
GNU Affero General Public License v3.0
2 stars 3 forks source link

Changes to dockerfile resulted in build failing on master #30

Open dcwalk opened 6 years ago

dcwalk commented 6 years ago
dcwalk commented 6 years ago

Copying over my comment from #29--

@b5 -- the dockerfile & makefile changes were merged in via #22 and #23 . Build was failing pre this PR, but agree there should be a pause until build is fixed, made an issue #30.

ibnesayeed commented 6 years ago

Since no details (or logs) were provided about the failure, I am not sure where the build is failing. However, if the failure is in Circle CI then I think I know the reason. The new features of Dockerfile I used were landed in Docker 17.05+ while the build script of CI is using an older version of the Docker client.

https://github.com/datatogether/coverage/blob/d02d1e61a54f362d55ca341d9e05a9bae7445beb/.circleci/config.yml#L53

It is worth noting that the currently used version 17.03.0-ce has reached its end of life in July. Changing it to the latest stable release 17.10.0-ce should potentially fix the issue.

Also, note that when #26 will be implemented, this build process will become irrelevant because DockerHub builds images using their latest enterprise edition.

b5 commented 6 years ago

ah amazing! Thanks for such an easy place to start debugging @ibnesayeed

ibnesayeed commented 6 years ago

I just looked at the Circle CI build logs. I can confirm that my guess was right.

Step 1/16 : ARG GOLANG_TAG=latest
Please provide a source image with `from` prior to commit
Exited with code 1

Two Dockerfile features (build args and multi-stage builds) were not available in post 17.05 versions. At that time FROM was the only valid first instruction in a Dockerfile, but now ARG can precede it.

ibnesayeed commented 6 years ago

This issue would have been caught if CI was triggered when I created the PR (and made any subsequent commits to it). But, for some reason it is setup in a way that I don't see any CI progress on my PRs.

ibnesayeed commented 6 years ago

It looks like Docker now puts pre-built binaries in a different location. Earlier, they were found under https://get.docker.com/, but now https://download.docker.com/ seems to be the place where various binaries are hosted for distribution. This means, the following line also needs to be updated:

https://github.com/datatogether/coverage/blob/d02d1e61a54f362d55ca341d9e05a9bae7445beb/.circleci/config.yml#L54

ibnesayeed commented 6 years ago

Docker CE 17.12.0 (on stable channel) was released last month. In order to fix this issue following lines should be updated:

https://github.com/datatogether/coverage/blob/d02d1e61a54f362d55ca341d9e05a9bae7445beb/.circleci/config.yml#L53-L54

To:

              VER="17.12.0-ce"
              curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz