Skip to content
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

Handle bug in Docker engine v23.0 update. #58

Closed
veritas9872 opened this issue Feb 8, 2023 · 6 comments
Closed

Handle bug in Docker engine v23.0 update. #58

veritas9872 opened this issue Feb 8, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@veritas9872
Copy link
Collaborator

veritas9872 commented Feb 8, 2023

A bug in the Docker engine v23.0 update means that using the COPY command changes the directory permissions of the directory the file is copied to. This causes an issue in the /tmp directory. which requires write permissions for apt installation, etc.
The simplest method of solving this problem is to COPY the files to /opt instead of /tmp.

@veritas9872 veritas9872 added the bug Something isn't working label Feb 8, 2023
@veritas9872
Copy link
Collaborator Author

Also, add comments somewhere that the reason for using COPY instead of opening a binding to get the requirements files is to prevent cache misses when other files in the same directory are changed even if the target file is the same. This should be tested to see if the issue still occurs.

@veritas9872
Copy link
Collaborator Author

veritas9872 commented Feb 8, 2023

For example, is the apt stage reinstalled when pip or conda requirements are modified?

@veritas9872
Copy link
Collaborator Author

veritas9872 commented Feb 8, 2023

The cache missing is indeed an issue. If a directory is used as a bind mount, changing any file in that directory will cause a cache miss.

@veritas9872
Copy link
Collaborator Author

Apparently, the new behavior of v23.0 is not a bug but fixes previous undefined behavior. It will have to be fixed all the same.

@veritas9872
Copy link
Collaborator Author

veritas9872 commented Feb 10, 2023

See here moby/buildkit#3602

@veritas9872
Copy link
Collaborator Author

Checked that the updated version functions correctly in Docker engine v23.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant