CI: Clean up alpine containers
PATCH 1/1 CI: Clean up alpine containers
* apk --no-cache is the preferred way of setting up containers, and it does shrink the image by a few MB.
* Neither container needs curl-dev.
* Flex and bison are needed for Xen, so move to the Xen block.
---
CC: Doug Goldstein <[email protected]>
CC: Wei Liu <[email protected]>
CC: Anthony PERARD <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Stefano Stabellini <[email protected]>
I've already rebuilt the containers and confirmed that the build is still fine.
--- automation/build/alpine/3.12-arm64v8.dockerfile | 69 ++++++++++------------- automation/build/alpine/3.12.dockerfile | 75 +++++++++++-------------- 2 files changed, 65 insertions(+), 79 deletions(-)
automation/build/alpine/3.12-arm64v8.dockerfile +31 -38
@@ -8,46 +8,39 @@ RUN mkdir /build WORKDIR /build # build depends -RUN \ - # apk - apk update && \ +RUN apk --no-cache add \ \ # xen build deps - apk add argp-standalone && \ - apk add autoconf && \ - apk add automake && \ - apk add bash && \ - apk add curl && \ - apk add curl-dev && \ - apk add dev86 && \ - apk add dtc-dev && \ - apk add gcc && \ + argp-standalone \ + autoconf \ + automake \ + bash \ + bison \ + curl \ + dev86 \ + dtc-dev \ + flex \ + gcc \ # gettext for Xen < 4.13 - apk add gettext && \ - apk add git && \ - apk add iasl && \ - apk add libaio-dev && \ - apk add libfdt && \ - apk add linux-headers && \ - apk add make && \ - apk add musl-dev && \ - apk add ncurses-dev && \ - apk add patch && \ - apk add python3-dev && \ - apk add texinfo && \ - apk add util-linux-dev && \ - apk add xz-dev && \ - apk add yajl-dev && \ - apk add zlib-dev && \ + gettext \ + git \ + iasl \ + libaio-dev \ + libfdt \ + linux-headers \ + make \ + musl-dev \ + ncurses-dev \ + patch \ + python3-dev \ + texinfo \ + util-linux-dev \ + xz-dev \ + yajl-dev \ + zlib-dev \ \ # qemu build deps - apk add bison && \ - apk add flex && \ - apk add glib-dev && \ - apk add libattr && \ - apk add libcap-ng-dev && \ - apk add pixman-dev && \ - \ - # cleanup - rm -rf /tmp/* && \ - rm -f /var/cache/apk/* + glib-dev \ + libattr \ + libcap-ng-dev \ + pixman-dev \
automation/build/alpine/3.12.dockerfile +34 -41
83 lines not on this page · raw message
Signature · 1 line
2.11.0
Quoted 31 lines · Andrew Cooper
*
apk --no-cacheis the preferred way of setting up containers, and it does shrink the image by a few MB.
* Neither container needs curl-dev.
* Flex and bison are needed for Xen, so move to the Xen block.Signed-off-by Andrew Cooper <[email protected]>---
CC: Doug Goldstein <[email protected]>
CC: Wei Liu <[email protected]>
CC: Anthony PERARD <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Stefano Stabellini <[email protected]>I've already rebuilt the containers and confirmed that the build is still fine.
---automation/build/alpine/3.12-arm64v8.dockerfile +1
-5@@ -8,46 +8,39 @@ RUN mkdir /build WORKDIR /build # build depends -RUN \ - # apk - apk update && \ +RUN apk --no-cache add \ \ # xen build deps - apk add argp-standalone && \ - apk add autoconf && \
automation/build/alpine/3.12-arm64v8.dockerfile RUN mkdir /build · line 16
Quoted 10 lines
automation/build/alpine/3.12-arm64v8.dockerfile +3
-7- apk add automake && \ - apk add bash && \ - apk add curl && \ - apk add curl-dev && \ - apk add dev86 && \ - apk add dtc-dev && \ - apk add gcc && \ + argp-standalone \ + autoconf \ + automake \
Since you are removing some other pkgs, I don't think "automake" is needed either. We only use "autoconf" and "autoheader". (Maybe the automake pkg give access to something we need, but I'm not sure about that.)
In any case, changes looks good:
Thanks,
Signature · 1 line
Anthony PERARD
Quoted 38 lines · Anthony PERARD
Quoted 37 lines · Andrew Cooper
*
apk --no-cacheis the preferred way of setting up containers, and it does shrink the image by a few MB.
* Neither container needs curl-dev.
* Flex and bison are needed for Xen, so move to the Xen block.Signed-off-by Andrew Cooper <[email protected]>---
CC: Doug Goldstein <[email protected]>
CC: Wei Liu <[email protected]>
CC: Anthony PERARD <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Stefano Stabellini <[email protected]>I've already rebuilt the containers and confirmed that the build is still fine.
---automation/build/alpine/3.12-arm64v8.dockerfile +1
-11@@ -8,46 +8,39 @@ RUN mkdir /build WORKDIR /build # build depends -RUN \ - # apk - apk update && \ +RUN apk --no-cache add \ \ # xen build deps - apk add argp-standalone && \ - apk add autoconf && \ - apk add automake && \ - apk add bash && \ - apk add curl && \ - apk add curl-dev && \ - apk add dev86 && \ - apk add dtc-dev && \
Quoted 8 lines
automation/build/alpine/3.12-arm64v8.dockerfile RUN mkdir /build · line 16
Quoted 4 lines
automation/build/alpine/3.12-arm64v8.dockerfile +3
-1- apk add gcc && \ + argp-standalone \ + autoconf \ + automake \Since you are removing some other pkgs, I don't think "automake" is needed either. We only use "autoconf" and "autoheader". (Maybe the automake pkg give access to something we need, but I'm not sure about that.)
Very good observation. We don't have automake in any other containers. I'll strip it out and double check the resulting build.
Quoted 2 lines
In any case, changes looks good:
Reviewed-by Anthony PERARD <[email protected]>
Thanks.
~Andrew