Skip to content

Honor --skip-login on jf docker build #3397

@joergsesterhenn

Description

@joergsesterhenn

Describe the bug

JFrog CLI 2.89 introduced changes to jf docker build that ignored the skip-login flag.
This leads to broken builds for us :/

Current behavior

export image = docker-local.dev-repos-prod-web.services.xxx/xyz/mvn:1.0.1

JFROG_CLI_LOG_LEVEL=DEBUG jf docker --skip-login build -f src/main/docker/Dockerfile -t $image . --build-name="foo" --build-number="1337"
10:33:21 [Debug] JFrog CLI version: 2.96.0
10:33:21 [Debug] OS/Arch: linux/amd64
10:33:21 [Debug] Trace ID for JFrog Platform logs: 8845d7dd185455ec
Error response from daemon: login attempt to https://xxxxx/v2/ failed with status: 404 Not Found
10:33:22 [Debug] docker login while assuming proxy-less failed: exit status 1
Error response from daemon: Get "https://https/v2/": dial tcp: lookup https on 1.2.3.4:53: no such host
exit status 1

Reproduction steps

export image = docker-local.dev-repos-prod-web.services.xxx/xyz/mvn:1.0.1

JFROG_CLI_LOG_LEVEL=DEBUG jf docker --skip-login build -f src/main/docker/Dockerfile -t $image . --build-name="foo" --build-number="1337"
10:33:21 [Debug] JFrog CLI version: 2.96.0
10:33:21 [Debug] OS/Arch: linux/amd64
10:33:21 [Debug] Trace ID for JFrog Platform logs: 8845d7dd185455ec
Error response from daemon: login attempt to https://xxxxx/v2/ failed with status: 404 Not Found
10:33:22 [Debug] docker login while assuming proxy-less failed: exit status 1
Error response from daemon: Get "https://https/v2/": dial tcp: lookup https on 1.2.3.4:53: no such host
exit status 1

Expected behavior

Do not ignore skip-login on 'jf docker build' since it is documented and used everywhere else:
--skip-login [Default: false] Set to true if you'd like the command to skip performing docker login.

JFrog CLI version

2.96.0

Operating system type and version

Linux 5.15.167.4-microsoft-standard-WSL2

JFrog Artifactory version

No response

JFrog Xray version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions