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

Johannes Müller

03/28/2023, 6:24 AM
Hi all! Could you give me a rough idea on how I can go about adding code from a git repository with the docker setup in
examples/deploy_docker/
? I see that there is a docker container with example code, so I imagine I would now set up my own docker container similar to that for my own project and add it to the
docker-compose
configuration. I'm unsure as to what the best practice is to pull the latest code from a git repository in that setup.
🤖 1
For now I put together a simple build script:
Copy code
cd code_repo
git pull
cd ..
sudo docker-compose build docker_example_user_code
sudo docker-compose up -d
I think Docker has some built in capabilites to load code from a github repository, which might be an improvement.
But I guess there is no way around actually rebuilding the complete container?
s

sean

03/28/2023, 5:16 PM
These are our docs on a basic docker setup: https://docs.dagster.io/deployment/guides/docker I’m not a docker expert, but I don’t think there is a way around rebuilding the image. You could just clone the repo in your Dockerfile though if you don’t want to use the script
💯 1
j

Johannes Müller

03/29/2023, 10:31 AM
Thanks @sean!
I think you are right.
Maybe I could work around it by mounting an external volume and automatically installing any new dependencies if the code changes.
But it feels too hacky.
s

sean

03/29/2023, 2:19 PM
yeah, there’s probably a lot of possible approaches-- but fundamentally this isn’t really a dagster issue but a docker one so I’m going to resolve this thread
👍 1
2 Views