Skip to content

Recursive copy in dockerfile should be avoided. #802

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

Closed
rohit-joy opened this issue May 7, 2025 · 4 comments · Fixed by #800
Closed

Recursive copy in dockerfile should be avoided. #802

rohit-joy opened this issue May 7, 2025 · 4 comments · Fixed by #800
Assignees

Comments

@rohit-joy
Copy link

This line in the dockerfile seems to be copying everything in the repo, but everything is not needed to build and run the app.

ADD . $APP_PATH

Can you modify this to just COPY over what is required?

@arielr-lt
Copy link
Collaborator

yes! definitely

@arielr-lt
Copy link
Collaborator

arielr-lt commented May 8, 2025

there is one detail, not sure if you noticed that there is a .dockerignore file, so it is not strictly a recursive copy, what I'm going to add to the file is the Dockerfile as you suggested, among other stuff

@rohit-joy
Copy link
Author

rohit-joy commented May 8, 2025

That can work, but .dockerignore can quickly go out of date. I would prefer that we copy just the folders or files that we need.

@arielr-lt
Copy link
Collaborator

sounds good @rohit-joy I will go down this road!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants