skip to Main Content

I’d like to pull a private image from Docker Hub in Paperspace Deployment.

It uses a yaml file, in which the command can overwrite the default pull command.

This is the yaml file:

image: image_name/ref
port: xxxx
command:
  - docker login -u 'docker_user' -p 'docker_password'
  - docker pull image_name/ref:latest
resources:
  replicas: 1
  instanceType: C4

I have the following error:

Node State: errored
Error: An error occurred when pulling image:[image_name/ref] from deployment

Note: the commands

  - docker login -u 'docker_user' -p 'docker_password'
  - docker pull image_name/ref:latest

Work from my PC.

2

Answers


  1. Chosen as BEST ANSWER

    In fact, there is a container menu to specify user and password (see team settings in the top right menu -> containers).

    Then you have to use the option "containerRegistry" to pull the image properly: image: image_name/ref containerRegistry: name_in_paperspace port: 5000 resources: replicas: 1 instanceType: C4

    Everything is explained in this video:

    https://www.youtube.com/watch?v=kPQ7AKwNlWU


  2. command in docker-compose.yaml is used to:

    overrides the default command declared by the container image

    Not overwrite the default pull command as what you thought.

    So, to let docker-compose to pull a private docker image, you need to do a initial docker login before run compose, detail see docker login.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search