CiscoTestAutomation / pyats-docker

Dockerfile and scripts for pyATS
Apache License 2.0
39 stars 11 forks source link

Reduce image size with multi stage build and fix dependency in alpine-full #11

Closed dani-maarouf closed 3 years ago

dani-maarouf commented 3 years ago

Use multi stage build to reduce size of images.

Alpine images are reduced by about 60mb because ADD src /src no longer creates a layer, and debian images are reduced by about 35mb because some temporary build files dont appear anymore in the final image.

21.5:          585MB    549MB
alpine:        426MB    363MB
alpine-full:   761MB    698MB
full:          962MB    925MB

Also alpine-full must build cryptography wheel which requires rust at build time, so add this to alpine-full