Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scratch image as base image of Skipper docker image #2951

Open
sepehrdaddev opened this issue Feb 21, 2024 · 5 comments
Open

Scratch image as base image of Skipper docker image #2951

sepehrdaddev opened this issue Feb 21, 2024 · 5 comments
Labels
architectural all changes in the hot path, big changes in the control plane, control flow changes in filters breaking change Breaking major change should be planned by a coordinationissue docker Pull requests that update Docker code security

Comments

@sepehrdaddev
Copy link
Member

Is your feature request related to a problem? Please describe.
Today skipper uses alpine 3 as a docker base image for docker images, while alpine 3 is one of most minimal docker images out there, it still comes with some unnecessary things such as busybox which can increase the security risk due to its increased attack surface.

Describe the solution you would like
Being a Go application, skipper can be used as a static binary and packaged as a docker image using scratch as a base and ca-certificates.
as ca-certificates are the only necessary things needs to run skipper (apart from the static builds), this will reduce the attack surface drastically and hence lower risk of any breaches.

Would you like to work on it?
Yes, but no time (likely)

@sepehrdaddev sepehrdaddev added security docker Pull requests that update Docker code labels Feb 21, 2024
@Ritish134
Copy link

Are you looking for these configurations in a docker image ??

Dockerfile

  • Start from scratch
    FROM scratch

  • Copy ca-certificates
    COPY --from=alpine:latest /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

  • Copy the Skipper binary into the container
    COPY skipper /skipper

  • Set the entry point for Skipper
    ENTRYPOINT ["/skipper"]

@szuecs
Copy link
Member

szuecs commented Feb 22, 2024

@Ritish134 yes

@Ritish134
Copy link

Could you please guide what next steps to perform to solve this issue ...

@szuecs
Copy link
Member

szuecs commented Feb 22, 2024

@Ritish134 either you do it or someone else will do it or we decide it's a nice idea but we won't have time.
Feel free to learn more about the topic, but we can't guide you there.

@szuecs
Copy link
Member

szuecs commented Feb 23, 2024

This issue can be dangerous to do, because it can break all kind of readinessProbes or livenessProbes. I added label "architectural" and "breaking change" because it seems to be very dangerous change, but looks "simple".

@szuecs szuecs added architectural all changes in the hot path, big changes in the control plane, control flow changes in filters breaking change Breaking major change should be planned by a coordinationissue labels Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architectural all changes in the hot path, big changes in the control plane, control flow changes in filters breaking change Breaking major change should be planned by a coordinationissue docker Pull requests that update Docker code security
Projects
None yet
Development

No branches or pull requests

3 participants