Docker Community Forums

Share and learn in the Docker community.

Dockerfile ADD an artifact from an artifactory that requires authentication

docker

(Skwokmag) #1

Hi,

I’d like to build an image by adding an artifact to an Ubuntu base image. The trick is that the artifactory is password-protected; thus, I need to provide the username and password, and I don’t want to save them in the Dockerfile. So, my question is what is the best practice to do it? Thank you.

skwok


(Sabin Basyal) #2

A better way is to provide any credentials (usernames, passwords, tokens, anything sensitive) as environment variables at runtime.

Regards,
Sabin