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

Simpler Dockerfiles, with more platforms #43

Closed
wants to merge 1 commit into from

Conversation

gquintard
Copy link

  • add ubuntu and centos images
  • leverage the upstream packages for rpm and deb platforms
  • for alpine, us the aports
  • simplify update.sh

@gquintard gquintard force-pushed the brutal_cleanup branch 7 times, most recently from e00ecd5 to 682f7d5 Compare May 3, 2019 22:06
@teohhanhui
Copy link
Contributor

add ubuntu and centos images

Unnecessary. Docker official images only use Debian and Alpine.

@gquintard
Copy link
Author

Unnecessary. Docker official images only use Debian and Alpine.

thanks, I didn't know that, I'll nuke them then

- leverage the upstream packages for debian
- for alpine, us the aports
- simplify update.sh
@teohhanhui
Copy link
Contributor

Sorry, I'm gonna close this. This is not gonna get us any closer to having an official Docker image. It has too many problems.

@teohhanhui teohhanhui closed this May 3, 2019
@gquintard
Copy link
Author

Can you explain which ones?

@teohhanhui
Copy link
Contributor

teohhanhui commented May 3, 2019

But I'll take a look at the aports / APKBUILD and see if we could use that.

I guess not.

done
RUN apt-get update && \
apt-get install -y curl && \
curl -s https://packagecloud.io/install/repositories/varnishcache/varnish%%VARNISH_VERSION%%/script.deb.sh | bash && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take for example, this part. We need (mostly) reproducible builds.

https://github.com/docker-library/official-images/blob/master/README.md#repeatability

@gquintard
Copy link
Author

Easy to change:

sudo apt-get install debian-archive-keyring curl gnupg apt-transport-https
curl -L https://packagecloud.io/varnishcache/varnish62/gpgkey | apt-key add -
echo deb https://packagecloud.io/varnishcache/varnish62/ubuntu/ trusty main > /etc/apt/sources.list.d/varnish.list

we can even embark the gpgkey so we don't have to download it. script.deb.sh is a helper, we can avoid using it, I was just trying to showcase how easy it was to just use the repo.

https://github.com/docker-library/official-images/blob/master/README.md#repeatability

so your issue is not really about the fact that we are using script.deb.sh, but that packages aren't pinned? If so, even we the change above, the file installs 5 packages, they are easy to lock down.

Would it make you happier if we got the package source from packagecloud and if we rebuilt it locally? If the alpine approach works for you, we can do the same thing with debian. I believe it's a waste of CPU power, but you get your package built from source, I get simpler Dockerfiles, and we all get proper packages

@teohhanhui
Copy link
Contributor

teohhanhui commented May 3, 2019

That's what we already do in #42? 😄

I don't build from source anymore for Debian, except for multiarch.

@gquintard
Copy link
Author

To be honest, I have no idea what happens it #42. the code is crazy

@teohhanhui
Copy link
Contributor

teohhanhui commented May 3, 2019

It's adapted from https://github.com/docker-library/postgres/blob/master/Dockerfile-debian.template

It's the one @tianon pointed us to. So we're in good hands. As official as it can get, learning from well-made Docker official images.

@gquintard
Copy link
Author

What about this: https://gist.github.com/gquintard/e3fd273388d7d685338306f975b9b73d ?

I don't understand why you would go for the monstrosity that is https://github.com/docker-library/postgres/blob/master/Dockerfile-debian.template when you can have a maintainable and legible Dockerfile.

I'm far from being a Docker genius, but the Dockerfile I linked to, I understand, Dockerfile-debian.template not so much, which is the reason I can't/won't review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants