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

Upgraded dnsmasq to 2.82-r0 #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

zerkms
Copy link

@zerkms zerkms commented Aug 20, 2020

The last image was built 2 years ago, can we please get a newer alpine and the current dnsmasq please?

@jpillora
Copy link
Owner

jpillora commented Aug 20, 2020 via email

@zerkms
Copy link
Author

zerkms commented Aug 20, 2020

It would be hard to guarantee, but from the changelog it looks there were no breaking changes: http://www.thekelleys.org.uk/dnsmasq/CHANGELOG

@jpillora
Copy link
Owner

jpillora commented Aug 20, 2020 via email

@zerkms
Copy link
Author

zerkms commented Aug 20, 2020

When somebody makes a decision to use a non-immutable tag - they need to weight the potential risks.

@polarathene
Copy link

polarathene commented Aug 21, 2020

and unfortunately, only 1 latest tag.

Users should know better than to rely on latest tag for reliability.


Looking for a dnsmasq image myself, and while this was one of the first results listed in the DockerHub search, I was not sure if the 2 years since the last update justified it as a good choice (dnsmasq releases are infrequent, but keeping the alpine image updated is nice to have).

I figured it was still worth checking the project activity on github, so nice to see this discussion! A similar image would be andyshinn/dnsmasq, last updated 4 days ago, which is slightly different(no Web UI) but quite popular too. Maybe consider updating this image every 6 months too with the latest alpine?

EDIT: Oh... just noticed you're using alpine:edge.. that's about as bad as latest in my opinion, adopting this image is a nope from me :(

Copy link

@polarathene polarathene left a comment

Choose a reason for hiding this comment

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

The changes here aren't providing any real benefit towards the intended goal of updating dnsmasq. Unless you need 2.82 before Alpine 3.13 is released, I'd advise changing the base image to Alpine 3.12 and using dnsmasq 2.81 for now.

This Dockerfile is not reliable and likely to break for future builds.

# webproc release settings
ENV WEBPROC_VERSION 0.2.2
ENV WEBPROC_URL https://github.com/jpillora/webproc/releases/download/$WEBPROC_VERSION/webproc_linux_amd64.gz
# fetch dnsmasq and webproc binary
RUN apk update \
&& apk --no-cache add dnsmasq \
&& apk --no-cache add dnsmasq=$DNSMASQ_VERSION \

Choose a reason for hiding this comment

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

For the same reasons that I don't advise edge builds beyond local use/testing, I would advise against version pinning, especially on edge repo. See official docs warning:

It is important to understand your package repo's version retention rules.
For example, most Alpine package repos contain an "edge" branch, which may drop package versions that are not deemed fit to make it into a stable branch.
This means that pinning to a version on the edge branch may stop working after the package version is revoked from the repo.
Always pin to a package version that is intended for your current Alpine Linux version.

Thus, this will likely break in future should anyone try to build this Dockerfile after releasing to Dockerhub. Which has tags that don't match dnsmasq releases either mind you.

@@ -1,11 +1,14 @@
FROM alpine:edge
LABEL maintainer="[email protected]"

ENV DNSMASQ_VERSION 2.82-r0

Choose a reason for hiding this comment

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

You're using the package manager, you shouldn't need to do this. If you build this Dockerfile again, edge has been updated since the DockerHub build from 2 years ago, this will automatically use the newer package version, which is exactly what you've specified here.

You can either just trigger a new build of the Dockerfile without this PR and have a new release on DockerHub pushed, or build to the current Alpine stable 3.12 release in May, which provides dnsmasq 2.81, 2.82 will become available near the end of the year with Alpine 3.13.

Copy link
Owner

@jpillora jpillora Aug 21, 2020

Choose a reason for hiding this comment

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

"Fix crash under heavy TCP connection load introduced in 2.81.
Thanks to Frank for good work chasing this down." dnsmasq CHANGELOG

If I'm going to bump dnsmasq, I'd rather just go with 2.82

Choose a reason for hiding this comment

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

It's your image, if you want to continue building your Dockerfile on alpine:edge go for it. Your image isn't all that complicated, nor will it be updating that frequently, so the risk of such is fairly minimal.

@jpillora
Copy link
Owner

So based on the comments above. The plan is to tag the current latest as v1.0.0/v1.0/v1. Bump alpine up, and lock to an explicit version, and bump dnsmasq (hopefully) to 2.82. Bump webproc to v0.4.0. Then release this new version as v1.1.0/v1.1.

My main priority is not breaking the build of existing users, though it appears the changes to dnsmasq are backwards compatible.

@polarathene
Copy link

Bump alpine up, and lock to an explicit version

You can't bump alpine:edge up, it's rolling. The current release is 3.12, but that will restrict you to dnsmasq 2.81.

Since you want to go with dnsmasq 2.82, continue to use alpine:edge and switch to alpine:3.13 next year.

@jpillora
Copy link
Owner

jpillora commented Aug 21, 2020 via email

@polarathene
Copy link

So if there’s good reason not to use edge, I’m all ears.

It is the same reason you would not use latest tag for a Docker image in production. Just like how you raised the concern about your current users not wanting breakage. They would not get breakage with a versioned tag, but if they use latest, the next time they pull your image the version could have changed and they get a different image than they might have expected.

The same applies with alpine:edge, except it's when someone builds from the Dockerfile. For example I used an image that relied on edge but it had not been updated for 1-2 years. I thought no problem, the Dockerfile is available, I will just build it and add my fix. It was not able to build successfully, because it could no longer produce the same Docker image that was built for DockerHub at the time it was released there, none of the packages were the same and breaking changes had happened.

It was more a complicated Dockerfile, so fixing that was more work. Yours is very simple, so the risk is low. It would only matter if someone tried to build it in a year or so and thought they would get the same dnsmasq version as the DockerHub tagged version provided, which they can no longer do if they wanted to troubleshoot something.

I don't think you'll experience that problem. Just document on DockerHub/README what your tagged version uses for dnsmasq and webproc, that's basically all there is that matters in this image.

If not, I think edge until next year is the way to go

Agreed.

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.

3 participants