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

updated docker file #22

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

updated docker file #22

wants to merge 1 commit into from

Conversation

macwinnie
Copy link

  • install latest version with all dependencies
  • remove unwanted additional image layers
  • expose ports 53 and 8080 so they can easily be adapted

@jpillora
Copy link
Owner

jpillora commented Apr 21, 2020 via email

@macwinnie
Copy link
Author

What do you mean by "ignore the host dns server"? Do you think about issue #21 ?
This issue is not resolved due to the fact, that port 53 can only be used once at one host.
If I misunderstood your question, please feel free to clearify =)

#configure dnsmasq
RUN mkdir -p /etc/default/
RUN echo -e "ENABLED=1\nIGNORE_RESOLVCONF=yes" > /etc/default/dnsmasq
Copy link
Owner

Choose a reason for hiding this comment

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

do we not need this file anymore?

Copy link
Owner

Choose a reason for hiding this comment

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

Copy link

@polarathene polarathene Aug 21, 2020

Choose a reason for hiding this comment

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

@jpillora this is in response to your review comments from earlier, github UI may not make that obvious.


They moved these two RUN lines into the first RUN to keep them all in the same layer.

They droped the two ENV declarations at the start of the file to call some shell script file you're hosting at https://i.jpillora.com/webproc, piping that through bash to retrieve the latest version of webproc that way. While nice, it will remove immutability of the build as the version is no longer pinned.

That script does some of the logic here, unarchiving the file and outputting a binary with execution rights enabled via chmod +x, it just needs to move the binary.

The ENTRYPOINT change is just whitespace formatting and renaming the --config option to match the newer option name you must have modified while developing webproc.

Addition of EXPOSE only serves value of communicating what ports the user should map to the image, it doesn't really do any thing beyond that.

Copy link
Owner

Choose a reason for hiding this comment

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

Ah yes, they just moved it 👍

Agreed, probably safer to keep existing logic and use the direct github URL.

@FlyingEagle
Copy link

Is it commited right now?
I not, where is the proble?

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.

LGTM, I would advise alpine:3.12 instead of alpine:latest, although this PR prevents immutable builds due to the change with curl no longer using a versioned URL.

If you're ok with that concern, then the PR is fine, trigger a new build of the same Dockerfile without any updates to it when you want to push a new release.

#configure dnsmasq
RUN mkdir -p /etc/default/
RUN echo -e "ENABLED=1\nIGNORE_RESOLVCONF=yes" > /etc/default/dnsmasq
Copy link

@polarathene polarathene Aug 21, 2020

Choose a reason for hiding this comment

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

@jpillora this is in response to your review comments from earlier, github UI may not make that obvious.


They moved these two RUN lines into the first RUN to keep them all in the same layer.

They droped the two ENV declarations at the start of the file to call some shell script file you're hosting at https://i.jpillora.com/webproc, piping that through bash to retrieve the latest version of webproc that way. While nice, it will remove immutability of the build as the version is no longer pinned.

That script does some of the logic here, unarchiving the file and outputting a binary with execution rights enabled via chmod +x, it just needs to move the binary.

The ENTRYPOINT change is just whitespace formatting and renaming the --config option to match the newer option name you must have modified while developing webproc.

Addition of EXPOSE only serves value of communicating what ports the user should map to the image, it doesn't really do any thing beyond that.

@@ -1,18 +1,24 @@
FROM alpine:edge
FROM alpine:latest

Choose a reason for hiding this comment

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

Note that this change will switch from edge to the latest supported Alpine release (currently 3.12). It would be wiser to be more explicit and just state 3.12 here and update accordingly in the future when newer releases of Alpine or dnsmasq are made available.

Copy link
Owner

Choose a reason for hiding this comment

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

Agreed, should be explicit version

@polarathene
Copy link

@FlyingEagle your PR is fine 👍

The only problem would be reproducible builds over time if required.

@jpillora
Copy link
Owner

See upgrade discussion here #24

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.

4 participants