Skip to content

Update of base docker images to something newer than alpine 3.12.3 #16170

Closed

Description

@oleksiyp

Title: Update base docker image to alpine-glibc:alpine-3.13_glibc-2.32

Description:
We have vulnerability scanning in our enterprise that detects older versions of alpine being vulnerable.
This prevents images from being imported to our registry.

Vulnerability ID Severity Package Type Package Fix
CVE-2021-30139 Medium APKG apk-tools-2.10.5-r1 2.10.6-r0
CVE-2021-28831 Medium APKG ssl_client-1.31.1-r19 1.31.1-r20
CVE-2021-28831 Medium APKG busybox-1.31.1-r19 1.31.1-r20
CVE-2021-3450 Medium APKG libssl1.1-1.1.1i-r0 1.1.1k-r0
CVE-2021-3450 Medium APKG libcrypto1.1-1.1.1i-r0 1.1.1k-r0
CVE-2021-3449 Medium APKG libssl1.1-1.1.1i-r0 1.1.1k-r0
CVE-2021-3449 Medium APKG libcrypto1.1-1.1.1i-r0 1.1.1k-r0
CVE-2021-23841 Medium APKG libssl1.1-1.1.1i-r0 1.1.1j-r0
CVE-2021-23841 Medium APKG libcrypto1.1-1.1.1i-r0 1.1.1j-r0
CVE-2021-23840 Medium APKG libssl1.1-1.1.1i-r0 1.1.1j-r0
CVE-2021-23840 Medium APKG libcrypto1.1-1.1.1i-r0 1.1.1j-r0
CVE-2021-23839 Medium APKG libssl1.1-1.1.1i-r0 1.1.1j-r0
CVE-2021-23839 Medium APKG libcrypto1.1-1.1.1i-r0 1.1.1j-r0

Is it possible to upgrade alpine base image to newer version?
Thanks!

Activity

  1. added
    enhancement
    triage
    on Apr 26, 2021
  2. changed the title [-]Docker image update to something newer than 3.12.3[/-] [+]Base docker image update to something newer than alpine 3.12.3[/+] on Apr 26, 2021
  3. changed the title [-]Base docker image update to something newer than alpine 3.12.3[/-] [+]Update of base docker images to something newer than alpine 3.12.3[/+] on Apr 26, 2021
  4. phlax commented on Apr 26, 2021

    @phlax
    Member

    @oleksiyp can you PR ?

    if not, im happy to

  5. added and removed
    triage
    on Apr 26, 2021
  6. self-assigned this
    on Apr 26, 2021
  7. oleksiyp commented on Apr 26, 2021

    @oleksiyp
    ContributorAuthor

    Will try to prepare it soon. I would do it right away if would be sure that this is just one place and build is okay.

  8. phlax commented on Apr 26, 2021

    @phlax
    Member

    i think the priority is ci/Dockerfile-envoy-alpine

    the ones in examples are less of a priority i think - and mostly use latest of whatever alpine-derived image they are based on

  9. moderation commented on Apr 26, 2021

    @moderation
    Contributor

    Fixing this would fix this aged issue - #14869

    I think the bigger question is should we be using an Alpine base at all? Alpine is a musl based OS. Envoy must have glibc. So in order to make Envoy work on a musl base we use frolvlad/alpine-glibc which adds back in all the glibc stuff. Does we trust frolvlad and who are they?

    I think a better approach would be to move to a base like Google's Distroless that has native glibc support

  10. oleksiyp commented on Apr 26, 2021

    @oleksiyp
    ContributorAuthor

    Distroless indeed would be great, especially the Istio case proves it is battletested.

  11. phlax commented on Apr 26, 2021

    @phlax
    Member

    +1 - altho that is going to involve updating docs/docker/ci/etc so is a much bigger task - i think we also need to publicise/warn if we change it

    could we fix the sec issues with this one first

  12. phlax commented on Apr 26, 2021

    @phlax
    Member

    related #15312

  13. oleksiyp commented on Apr 26, 2021

    @oleksiyp
    ContributorAuthor

    @phlax I don't want to block you if you ready to update it. I am very new to envoy codebase and will need to set up build tools. (and planning to do this evening). But maybe it is just as simple as a one-line change. So feel free to not depend on me.

  14. phlax commented on Apr 26, 2021

    @phlax
    Member

    But maybe it is just as simple as a one-line change

    im not sure tbh - i was just checking the upstream repo (https://hub.docker.com/r/frolvlad/alpine-glibc/tags?page=1&ordering=last_updated&name=glibc-2.31) and not sure if there is a one line fix

  15. phlax commented on Apr 26, 2021

    @phlax
    Member

    i guess in part it deps on whether we are tied to glibc 2.31 - not sure how the other images there are in terms of the issues you raised

  16. oleksiyp commented on Apr 26, 2021

    @oleksiyp
    ContributorAuthor

    I checked alpine release changelog:

    CVE-2021-23839  3.12.4
    CVE-2021-23840  3.12.4
    CVE-2021-23841  3.12.4
    CVE-2021-3449   3.12.5
    CVE-2021-3450   3.12.5
    CVE-2021-28831  3.12.6
    CVE-2021-30139  3.12.7
    

    The last one released 12 days ago and upstream is released 2 months ago.

    @frol is the maintainer/packager of upstream packages. Hi Vlad, is it possible to build alpine 3.12.7 with glibc 2.31 ?

  17. frol commented on Apr 26, 2021

    @frol

    @oleksiyp I triggered the automated builds on Docker Hub. The images should be ready in a while

  18. oleksiyp commented on Apr 27, 2021

    @oleksiyp
    ContributorAuthor

    Thanks @frol !

    Seems no changes required from the source code perspective. The tag was changed. I downloaded recent image and checked if /etc/alpine-release = 3.12.7
    This is of course against best practices as the tag might have changed at the last moment before release and not tested at all.

    @phlax do you know when the next release is planned?

  19. phlax commented on Apr 27, 2021

    @phlax
    Member

    not sure - but i think its a 3 month cycle

    if you create a PR with the newer alpine image you will be able to test the created docker image

  20. oleksiyp commented on Apr 27, 2021

    @oleksiyp
    ContributorAuthor

    But not clear what to change because ci/Dockerfile-envoy-alpine is relying upon a mutable tag that is already changed to the most recent version.

  21. phlax commented on Apr 27, 2021

    @phlax
    Member

    ah k - i see

    you could use the envoy-alpine-dev image from https://hub.docker.com/r/envoyproxy/envoy-alpine-dev/tags?page=1&ordering=last_updated

    i dont think that has updated since the base image changed yet

    the other way is to test out of a more recent azure build (that hasnt failed) for example here https://dev.azure.com/cncf/envoy/_build/results?buildId=73446&view=artifacts&pathAsName=false&type=publishedArtifacts

    there are docker artefacts there - but be warned that the download is huge as it contains all of the images created in ci

  22. oleksiyp commented on May 1, 2021

    @oleksiyp
    ContributorAuthor

    Great we have newer version of alpine, but this doesn't guarantee that when next time release going to happen scanner do not find something else. I think best would be to have distroless based Envoy not instead of alpine, but together with alpine. @phlax does this sound good? Should I create new Issue for that?

  23. moderation commented on May 1, 2021

    @moderation
    Contributor

    +1 for distroless base

  24. phlax commented on May 1, 2021

    @phlax
    Member

    yep! absolutely agreed that this is the best first step

    we can deprecate alpine once we have that in place i think

    you might want to co-ordinate with @omriz and use bazel as in #15312

    figuring out the mulltiarch without buildx is kinda the problem that way - maybe dont let that be a blocker and lets just get a recipe working first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/buildarea/dockerenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions