Initially It was working (pulling the cypress image and container)for FROM cypress/base:10 . now want to upgrade cypress version to cypress/base:16.13.0
Below is my Dockerfile :
# FROM cypress/base:10
FROM cypress/base:16.13.0
COPY ./cypress ./cypress
COPY ./cypress.json ./cypress.json
COPY ./package.json ./package.json
COPY ./package-lock.json ./package-lock.json
RUN npm run cy:run
CMD ["npm", "install"]
As I upgraded the cypress version cypress/base:16.13.0 it throwing an error
+ docker build -f Dockerfile -t testcypress .
Sending build context to Docker daemon 6.245MB
Step 1/8 : FROM cypress/base:latest
Head "https://registry-1.docker.io/v2/cypress/base/manifests/16.13.0": unauthorized: incorrect username or password
Jenkinsfile
stage('build test') {
steps {
sh ' docker build -f Dockerfile -t testcypress .'
}
}
cypress/base:16.13.0is public image Why it is throwing error of unauthorized?- Test is executing on jenkins server (not on my local m/c), so can not do the docker logout , login. as suggested https://stackoverflow.com/a/55049799/3302083
- Also tried by changing the 'docker slave Lable' from Jenkin's global configuration.
Kindly suggest how to resolved this authorization issue? Please suggest me if I need to pass dockerhub credentials then where (jenkinfile or dockerfile )? Also suggest me syntax also ?