Hello, I am working with dagster cloud and trying ...
# ask-community
e
Hello, I am working with dagster cloud and trying to run a pipeline on my local machine using the docker agent. I am trying to use an image that is on a private ECR repository when configuring the workspace on dagit as described here https://docs.dagster.cloud/guides/adding-code Is there a way you can configure dagster to use the credentials for the ECR repo so that it can be able to pull the image in my local machine and use it to create a container? I am getting the following error and i think it is an authentication problem. How do you configure the docker agent to be able to pull an image from a private ECR repository?
d
Hi Elsis - you may need to give your agent container access to the docker credentials if you ran 'docker login' to connect your docker to ECR. Often that looks like adding this to the command that starts up the agent:
Copy code
--volume ~/.docker:/root/.docker \
(Assuming that ~/.docker is where your credentials ended up when you ran
docker login
). Let me know if that helps - the first thing I would check is to verify that you're able to pull the image in the same machine where the agent is running
e
Thank you @daniel, this seems to work. When trying to add a code location I am however running into this error that I am not sure how to describe . I am not sure where the network
network striata_sl_pipelines
is coming from since i have instructed the dagster cloud agent to run in a different network name as shown by these commands
Copy code
docker run \
  --platform linux/amd64 \
  --network=elsis-test-network \
  --volume $PWD/dagster.yaml:/opt/dagster/app/dagster.yaml:ro \
  --volume /var/run/docker.sock:/var/run/docker.sock \
  --volume  ~/.docker:/root/.docker \
  --restart on-failure \
  -it <http://docker.io/dagster/dagster-cloud-agent:latest|docker.io/dagster/dagster-cloud-agent:latest> \
  dagster-cloud agent run /opt/dagster/app
Here is how the code location looks like
d
What does your dagster.yaml look like that the agent is running?
e
Here is how it looks like @daniel
I have removed the agent token since i am sharing this in a public channel
d
no problem. Would you mind posting or DMing a link to your cloud dagit page?
Did you ever enter striata_sl_pipelines anywhere before?
or is it coming totally out of nowhere?