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

Change modification time to be consistent with nix store #141

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

3Dcube
Copy link
Contributor

@3Dcube 3Dcube commented Jul 8, 2024

I investigated why my nginx worked fine on my host nixos but not in the container. I found that nginx is patched to better handle files inside the nix store, but one of the condition is that mtime should be 1. I checked /nix/store on my system and yes all files have mtime 1, then I checked /nix/store files inside the container and mtime is 0

https://github.com/NixOS/nixpkgs/blob/194846768975b7ad2c4988bdb82572c00222c0d7/pkgs/servers/http/nginx/nix-etag-1.15.4.patch#L43

After changing modification time from 0 to 1 in the nix2container that patch started to work as expected

@nlewo
Copy link
Owner

nlewo commented Jul 10, 2024

Thank you.

(tests locally passed.)

@nlewo nlewo merged commit 3853e5c into nlewo:master Jul 10, 2024
2 of 3 checks passed
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 this pull request may close these issues.

2 participants