https://dagster.io/ logo
#ask-community
Title
# ask-community
e

Elsis Sitati

07/20/2022, 7:51 PM
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

daniel

07/20/2022, 8:04 PM
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

Elsis Sitati

07/20/2022, 9:14 PM
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

daniel

07/20/2022, 9:17 PM
What does your dagster.yaml look like that the agent is running?
e

Elsis Sitati

07/20/2022, 9:25 PM
Here is how it looks like @daniel
I have removed the agent token since i am sharing this in a public channel
d

daniel

07/20/2022, 9:26 PM
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?
3 Views