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

Introduce build arguments #58

Merged
merged 3 commits into from
Dec 12, 2016
Merged

Introduce build arguments #58

merged 3 commits into from
Dec 12, 2016

Conversation

bradbeck
Copy link
Contributor

@bradbeck bradbeck commented Dec 7, 2016

Allow NEXUS_VERSION and NEXUS_DOWNLOAD_URL to be overridden at build time, e.g.

docker build -t nexus-custom --build-arg NEXUS_VERSION=3.x.y --build-arg NEXUS_DOWNLOAD_URL=http:https://.../nexus-3.x.y-unix.tar.gz .

Allow NEXUS_VERSION and NEXUS_DOWNLOAD_URL to be overridden at build time, e.g.

docker build -t nexus-snapshot --build-arg NEXUS_VERSION=3.2.0-SNAPSHOT --build-arg NEXUS_DOWNLOAD_URL=http:https://.../nexus-....-unix.tar.gz .
@joedragons
Copy link
Contributor

+1 tho I didn't run the command (just looked at changes).
This seems super useful for testing snapshots pre-release (for example). Appreciate it.

@DarthHater
Copy link
Member

DarthHater commented Dec 8, 2016

This is cool, I would add a note to the README on usage as well, +1 otherwise

On a separate note we could likely convert a lot of the ENV variables to ARG (I don't know if they really need to be ENV variables).

@bradbeck bradbeck requested a review from jswank December 12, 2016 18:24
@jswank
Copy link
Contributor

jswank commented Dec 12, 2016

+0. Having the URL as a parameter is useful (env variables can already be used to control everything else), but I'm not sold on the utility of build args vs. env variables for this.

@bradbeck
Copy link
Contributor Author

AFAIK, environment variables cannot be specified at build time which is when you would need to have these options available since they are not really changeable at container runtime. Also, the current dockerfile does not expose the download url to be overridden.

@jswank
Copy link
Contributor

jswank commented Dec 12, 2016

In that case, it looks good to me ;)

Copy link
Contributor

@jswank jswank left a comment

Choose a reason for hiding this comment

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

LGTM

@bradbeck bradbeck merged commit 1d3a285 into master Dec 12, 2016
@bradbeck bradbeck deleted the nexus-build-args branch December 12, 2016 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants