-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(server): avoid copying sources in dev #12794
Conversation
Add a dev target to the web and server Dockerfiles, and change docker-compose.dev.yml to use the dev target. The dev target avoids copying files so that the docker image is smaller.
docker/docker-compose.dev.yml
Outdated
@@ -55,6 +55,7 @@ services: | |||
image: immich-web-dev:latest | |||
build: | |||
context: ../web | |||
target: dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the web Dockerfile is only ever used for development so you can revert related changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for taking so long. I have removed the target: dev
and removed the COPY
from the web/Dockerfile
completely so that it can only be used with the source volume.
Hello, any update on this PR? |
web/Dockerfile is only used by docker-compose.dev.yml so a dev target is redundant. Instead, just remove the copy
Hey @yonran, is this ready to be reviewed and merged? Changes look simple, if they're good from your end I can give this a quick test and merge it in. |
Yes please |
* chore(server): avoid copying sources in dev Add a dev target to the web and server Dockerfiles, and change docker-compose.dev.yml to use the dev target. The dev target avoids copying files so that the docker image is smaller. * chore: respond to PR: don't add dev target web/Dockerfile is only used by docker-compose.dev.yml so a dev target is redundant. Instead, just remove the copy --------- Co-authored-by: Jason Rasmussen <[email protected]>
Add a dev target to the web and server Dockerfiles, and change docker-compose.dev.yml to use the dev target. The dev target avoids copying files so that the docker image is smaller.
My motivation was that when I tried using docker-compose.dev.yml, I kept running out of disk space because docker would create big docker containers with copies of the application code even though they weren’t being used.