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

Support proxy build arguments when building Docker images #693

Open
gquintana opened this issue Apr 7, 2023 · 0 comments
Open

Support proxy build arguments when building Docker images #693

gquintana opened this issue Apr 7, 2023 · 0 comments
Labels
type: improvement A minor improvement to an existing feature

Comments

@gquintana
Copy link

gquintana commented Apr 7, 2023

Working behind a corporate HTTP proxy makes everything harder.
Here the docker-native goal fails on yum update && yum install

[INFO] Could not retrieve mirrorlist http://amazonlinux.default.amazonaws.com/2/core/latest/x86_64/mirror.list error was
12: Timeout on http://amazonlinux.default.amazonaws.com/2/core/latest/x86_64/mirror.list: (28, 'Failed to connect to amazonlinux.default.amazonaws.com port 80 after 5001 ms: Timeout was reached')

[ERROR] The command '/bin/sh -c yum update -y && yum install -y gcc gcc-c++ zlib-devel zip tar gzip && yum clean all' returned a non-zero code: 1

[ERROR] Failed to execute goal io.micronaut.build:micronaut-maven-plugin:3.5.3:docker-native (default-docker-native) on project laundry-micronaut-lambda: Execution default-docker-native of goal io.micronaut.build:micronaut-maven-plugin:3.5.3:docker-native failed: Could not build image: The command '/bin/sh -c yum update -y && yum install -y gcc gcc-c++ zlib-devel zip tar gzip && yum clean all' returned a non-zero code: 1

I managed to manually build the docker image by adding docker build args:

docker build --build-arg http_proxy=<proxy host>:<proxy port> --build-arg https_proxy=<proxy host>:<proxy port> .

Is it be possible to control the docker command arguments from Maven configuration?

@alvarosanchez alvarosanchez changed the title docker-native behind HTTP proxy fails on yum update Support proxy build arguments when building Docker images Apr 10, 2023
@alvarosanchez alvarosanchez added the type: improvement A minor improvement to an existing feature label Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement A minor improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants