Comment 0 for bug 1652622

Revision history for this message
codywohlers (codywohlers) wrote :

Docker image `ubuntu:16.04` (docker-brew-ubuntu), which pulls from partner-images, has a default `/etc/cron.weekly` entry. Therefore if you install `cron` then fstrim is run every week and produces the following errors in a docker container:

`$ docker run -ti -v tmp:/tmp2 ubuntu:16.04 /sbin/fstrim --all
fstrim: /etc/hosts: not a directory
fstrim: /etc/hostname: not a directory
fstrim: /etc/resolv.conf: not a directory
fstrim: /tmp2: FITRIM ioctl failed: Operation not permitted`

I think the `/etc/cron.weekly/fstrim` entry should be removed from the image so that if you install cron it is not run. Also, should `/sbin/fstrim` even be included at all? (It is part of linux-utils)

References:
docker-brew-ubuntu github issue 72: https://github.com/tianon/docker-brew-ubuntu-core/issues/72
serverfault question 820169: http://serverfault.com/questions/820169/should-i-be-running-fstrim-in-a-container/