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 --build-arg property for extension container-image-docker #9676

Closed
haraldatbmw opened this issue May 29, 2020 · 2 comments · Fixed by #9678
Closed

Docker --build-arg property for extension container-image-docker #9676

haraldatbmw opened this issue May 29, 2020 · 2 comments · Fixed by #9678
Assignees
Labels
Milestone

Comments

@haraldatbmw
Copy link
Contributor

Describe the bug
Using the extension container-image-docker there is no way to pass dockers --build-arg.
My docker build (Dockerfile.jvm) fails because I'm behind a proxy and during build internet connectivity is needed (RUN microdnf install ...).

I need run the docker build like docker build --build-arg http_proxy=http://localhost:3128 --build-arg https_proxy=http://localhost:3128 ...

Expected behavior
The extension has a property inside application.properties to be able to configure dockers build-arg.

Actual behavior
No configuration option

To Reproduce
Steps to reproduce the behavior:

  1. Add extension container-image-docker to pom.xml
  2. Be sure to be behind a proxy
  3. Let the extension do your docker build.

Environment (please complete the following information):

  • Output of uname -a or ver: Microsoft Windows [Version 10.0.17134.1488]
  • Output of java -version:
    openjdk version "11.0.6" 2020-01-14 LTS
    OpenJDK Runtime Environment Zulu11.37+17-CA (build 11.0.6+10-LTS)
    OpenJDK 64-Bit Server VM Zulu11.37+17-CA (build 11.0.6+10-LTS, mixed mode)
  • GraalVM version (if different from Java):
  • Quarkus version or git rev: 1.5.0.CR1
  • Build tool (ie. output of mvnw --version or gradlew --version): Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
@haraldatbmw haraldatbmw added the kind/bug Something isn't working label May 29, 2020
@haraldatbmw
Copy link
Contributor Author

cc @geoand

@geoand geoand added kind/enhancement New feature or request and removed kind/bug Something isn't working labels May 29, 2020
@geoand geoand self-assigned this May 29, 2020
geoand added a commit to geoand/quarkus that referenced this issue May 29, 2020
@geoand
Copy link
Contributor

geoand commented May 29, 2020

#9678 introduces that ability.

By just adding:

quarkus.docker.build-args.http_proxy=http://localhost:3128
quarkus.docker.build-args.https_proxy=http://localhost:3128

the docker command would now be something like:

docker build -f /tmp/test/src/main/docker/Dockerfile.jvm --build-arg http_proxy=http://localhost:3128 --build-arg https_proxy=http://localhost:3128 -t group/test:1.0-SNAPSHOT /tmp/test

geoand added a commit that referenced this issue May 29, 2020
Add support for Docker's --build-arg
@gsmet gsmet added this to the 1.6.0 - master milestone Jun 10, 2020
johnaohara pushed a commit to johnaohara/quarkus that referenced this issue Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants