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

Docker Container for prometheus isn't up to date and contains security vulnerabilities #1071

Closed
mrosic opened this Issue Sep 11, 2015 · 8 comments

Comments

Projects
None yet
5 participants
@mrosic
Copy link

mrosic commented Sep 11, 2015

The docker container with prometheus is not up to date, it uses libssl 1.0.2b-r0 which contains several security vulnerabilities.

Please include
RUN apk update
RUN apk upgrade
at the end of your Dockerfile. This slows down the build process but it guarantees that users will always receive a container that is up to date.

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Sep 11, 2015

Paging our local docker expert @discordianfish : I leave it to you to come up with the best course of action here. (Requiring access to the public Debian repo sounds like problematic to me as the default setting.)

@discordianfish

This comment has been minimized.

Copy link
Member

discordianfish commented Sep 11, 2015

@beorn7 It's not debian, it's alpine linux.
In general we should make sure the base image is up to date and that is managed by @sdurrheimer. I've created a repo link which should cause prometheus to get rebuild if the base image gets updated.
Maybe it's time to move the base image to the prometheus org so we can easily update it. Let see what @sdurrheimer says.

@mrosic

This comment has been minimized.

Copy link
Author

mrosic commented Sep 11, 2015

Okay, I've looked at that again:
Prometheus doesn't use libssl and /bin/prometheus is the only process running inside the container. It is dynamically linked to
/lib64/ld-linux-x86-64.so.2 (0x7f67f0912000)
libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f67f0912000)
libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f67f0912000)

If you were to build prometheus statically you could theoretically ignore most of the stuff in the container (including most of the security vulnerabilities) and never update it.

It wouldn't be pretty but it could be good enough as long as we only use the container like a binary executable.

@discordianfish

This comment has been minimized.

Copy link
Member

discordianfish commented Sep 11, 2015

@mrosic That's correct, prometheus shouldn't use all those things so I'd consider this issue low priority. Still, we shouldn't ship vulnerable libraries.
Another option would be to stop using the Dockerfile and build the container 'manually' like this: https://blog.codeship.com/building-minimal-docker-containers-for-go-applications/

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Sep 11, 2015

@discordianfish 👍 I really like that approach and we should go towards it IMO as soon as someone finds the time to do it.

@sdurrheimer

This comment has been minimized.

Copy link
Member

sdurrheimer commented Sep 11, 2015

I've triggered manual build of the base image but normally it's all automatic.

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Sep 14, 2015

Thanks! Closing this for now. I'm really in favor of only including the statically built Prometheus binaries in the future though.

@juliusv juliusv closed this Sep 14, 2015

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.