Skip to main content
JZelek
Silver ⭐️
March 16, 2023
Question

How to enter Credentials for Docker Container Downloads?

I'm trying to build a Docker container from Cloudera's repo but am getting an authentication error. This is the beginning of my .docker file:

 

FROM docker.repository.cloudera.com/cdsw/engine:13

 

I have the credentials from the generator and can easily pull-down things via wget but how do I tell the docker engine to use the credentials when it goes to retrieve the engine from the cloudera repo?

10 replies

DianaTorres
Community Manager
Community Manager
March 16, 2023

@JZelek Welcome to the Cloudera Community!

To help you get the best possible solution, I have tagged our CDSW experts @Gopinath  and @Mike who may be able to assist you further.

Please keep us updated on your post, and we hope you find a satisfactory solution to your query.

Translate
Regards, Diana Torres, Senior Community Moderator
Mike
Gold ⭐️
Gold ⭐️
March 20, 2023

Hi, the docker repository is available publicly. You can test by running:
docker pull docker.repository.cloudera.com/cdsw/engine:13
does that work?
Can you paste the actual authentication error you are seeing? Is it an x509 error?
Can you paste the contents of /etc/docker/daemon.json?

Translate
JZelek
JZelekAuthor
Silver ⭐️
March 22, 2023

Ok I can pull engine 13 just fine when your running your command. There isn't a daemon.json file in /etc/docker so nothing to paste.

 

As for the actual authentication error, here's what we're getting when running docker build:

 

# docker build --network host -t cdsw-rstudio:1.23 . -f cdsw-rstudio_1.23.docker
Sending build context to Docker daemon 23.34 GB
Step 1/10 : FROM docker.repository.cloudera.com/cdsw/engine:13
---> b7a3740cff9e
Step 2/10 : WORKDIR /tmp
---> Using cache
---> 96c7163e7e85
Step 3/10 : ADD required_packages /tmp/required_packages
---> 7d344c7fd765
Removing intermediate container 6d536b926846
Step 4/10 : RUN apt-get update && apt-get install -y --no-install-recommends linuxbrew-wrapper xauth x11-apps xvfb xfonts-base libapparmor1 libclang-dev lsb-release psmisc sudo && apt-get clean && apt-get autoremove && rm -rf /var/lib/apt/lists/*
---> Running in ba5bc1cabf09
Get:2 https://dl.yarnpkg.com/debian stable InRelease [17.1 kB]
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Err:1 https://archive.cloudera.com/cdh6/6.2.0/ubuntu1804/apt bionic-cdh6 InRelease
401 Authentication required [IP: 199.232.8.167 443]
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [83.3 kB]
Err:2 https://dl.yarnpkg.com/debian stable InRelease
The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn@dan.cx>
Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [3,640 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [1,503 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [2,381 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [30.8 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [64.0 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [20.5 kB]
Get:13 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [3,219 kB]
Get:14 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [1,462 kB]
Get:15 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1,607 kB]
Get:16 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [23.8 kB]
Reading package lists...
E: Failed to fetch https://archive.cloudera.com/cdh6/6.2.0/ubuntu1804/apt/dists/bionic-cdh6/InRelease 401 Authentication required [IP: 199.232.8.167 443]
E: The repository 'https://archive.cloudera.com/cdh6/6.2.0/ubuntu1804/apt bionic-cdh6 InRelease' is no longer signed.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn@dan.cx>
The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends linuxbrew-wrapper xauth x11-apps xvfb xfonts-base libapparmor1 libclang-dev lsb-release psmisc sudo && apt-get clean && apt-get autoremove && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100

Translate
Gopinath
Gold ⭐️⭐️
Gold ⭐️⭐️
April 11, 2023

Below snip indicate auth failure with the Cloudera paywall. Can you try "docker login" with your paywall credentials. Presume that could mitigate the 401 response. 

E: Failed to fetch 
https://archive.cloudera.com/cdh6/6.2.0/ubuntu1804/apt/dists/bionic-cdh6/InRelease 401 Authentication required [IP: 199.232.8.167 443]
E: The repository 'https://archive.cloudera.com/cdh6/6.2.0/ubuntu1804/apt bionic-cdh6 InRelease' is no longer signed.

Translate
DianaTorres
Community Manager
Community Manager
April 20, 2023

@JZelek Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks

Translate
Regards, Diana Torres, Senior Community Moderator
Platinum ⭐️⭐️
April 21, 2023

Hello

To authenticate and download a Docker image from a private repository such as Cloudera's repo, you can provide the credentials during the Docker build process using the "docker login" command.

Here are the steps to authenticate and download Cloudera's repo image:

  1. Open a terminal and run the following command to authenticate with Cloudera's repo:

    docker login docker.repository.cloudera.com

    This command will prompt you for the username and password provided by the generator.

  2. Create a Dockerfile with the following contents

 

FROM docker.repository.cloudera.com/cdsw/engine:13

 

  1. Run the following command to build the Docker image:

    docker build -t my-image.

    This command will build the Docker image using the Dockerfile and download the Cloudera's repo image using the authenticated credentials.

Note that you only need to authenticate with the private repository once per Docker engine. Once authenticated, the Docker engine will use the same credentials for subsequent pulls from that repository.

Translate
akshay0103
Silver ⭐️⭐️
April 17, 2024

Hi @Former Member @Gopinath @DianaTorres 

Tried using the paywall credential and it gives me the erorr below as 'Account is not active'. 
Can you tell me how to activate it.

 

[root@fraighadopappu37 dladmin]# docker login docker.repository.cloudera.com
Username: 979*******-*****-*******-*******
Password:****************
Error response from daemon: Login: Account is not active. Please see the documentation of the registry http://docker.repository.cloudera.com/v1/ for instructions how to activate it.

Translate
Gopinath
Gold ⭐️⭐️
Gold ⭐️⭐️
April 17, 2024

@akshay0103 are the paywall credentials active?  If they are not active, please reach your account team or create a administrative support case through my Cloudera portal.


You may validate it by accessing parcels or any object behind the paywall [for example: https://archive.cloudera.com/p/cdp-pvc-ds/].

Translate
akshay0103
Silver ⭐️⭐️
April 18, 2024

@Gopinath Thanks much for your reply.
Yes its active. We are able to download parcels/packages related to DS and CDP using the same. But it says inactive with 'docker login docker.repository.cloudera.com'

Is there a separate process for getting it activated for getting docker images?

 

Translate
Gopinath
Gold ⭐️⭐️
Gold ⭐️⭐️
April 26, 2024

@akshay0103  Could you please check with your account team of a new docker credentials or getting the existing one activated or create an administrative case. 

Translate