Zypper repository authentication (non-interactive) Zypper repository authentication (non-interactive) docker docker

Zypper repository authentication (non-interactive)


Solved it like this:

Dockerfile

ARG MY_REPO_USERNAMEARG MY_REPO_PASSWORDRUN zypper -n addrepo https://$MY_REPO_USERNAME:$MY_REPO_PASSWORD@repo.domain/foo/bar repo-domain-alias

When building the image:

docker build --build-arg MY_REPO_USERNAME=my_username --build-arg MY_REPO_PASSWORD=my_password -tag my-image-name .