docker-library / wordpress

Docker Official Image packaging for WordPress
https://wordpress.org/
GNU General Public License v2.0
1.79k stars 1.07k forks source link

Disable tar extract file modified time #916

Open ffais opened 3 months ago

ffais commented 3 months ago

I added the --touch flag as targetTarArgs to prevent the "Cannot utime: Operation not supported" error message from appearing, especially when some storage types (e.g. Azure FileShare) are used on Kubernetes.

tianon commented 3 months ago

Hmm, I think copying the mtime is generally desirable, even if only cosmetic. I guess I wish there was a "try to preserve mtime but don't fail if you can't" flag. :disappointed:

ffais commented 2 months ago

A solution could be to introduce a flag like "unsupportedmtime=true|false" and add the touch argument based on that, instead of setting it by default.

Something like that:


    if [ "$unsupportedmtime" != 'false' ]; then
            targetTarArgs+=(
                --touch
            )
    fi