Canto-Network / Canto

Layer-1 blockchain powered by Free Public Infrastructure
GNU Lesser General Public License v3.0
82 stars 79 forks source link

ci: Fix the Dockerfile and build from CI #141

Open AndreMiras opened 2 months ago

AndreMiras commented 2 months ago

Description

Fix the Dockerfile and add the Docker build to the CI. The docker build error was:

1.359 E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-amd64/Packages  404  Not Found
1.359 E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-amd64/Packages  404  Not Found
1.359 E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-amd64/Packages  404  Not Found
1.359 E: Some index files failed to download. They have been ignored, or old ones used instead.

Also use a minimal image for the final build stage. New image size is 240MB vs 4.4G for the old one.

In a follow up PR we could add multi-arch build support and automatic image upload to Docker registries.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.

I have...

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.

I have...