-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Description
Description
Starting v2.23.0 something broke and doing basic docker-compose pull fails when run from systemd unit, I assume this is due to lack of env var as the error seen is:
initializing git cache: could not create any of the following paths: /.cache/docker-compose
I can't imagine writing in root is desired but again is probably side effect of $HOME not being set. We should no longer assume / is writeable which more and more is not, considering OS with ro root fs like coreos. We can also not assume $HOME is set, some stronger mechanism should be used.
Rolling back to v2.22.x works fine
Steps To Reproduce
- create a oneshot systemd unit that runs docker-compose pull
- start the unit
- journalctl will show the error
Noticed on fedora coreos
Compose Version
Docker Compose version v2.22.0
no plugin
Docker Environment
Client:
Context: default
Debug Mode: false
Server:
Containers: 7
Running: 7
Paused: 0
Stopped: 0
Images: 7
Server Version: 20.10.23
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: journald
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: /usr/libexec/docker/docker-init
containerd version:
runc version:
init version:
Security Options:
seccomp
Profile: default
selinux
cgroupns
Kernel Version: 6.4.15-200.fc38.x86_64
Operating System: Fedora CoreOS 38.20230902.3.0
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 1.907GiB
Name: bastion01-test-5grcs-com
ID: J7JL:ULEZ:XK6Z:APFN:4HTL:P3H3:CISE:2KTK:IVDM:P7O3:5R46:YMZY
Docker Root Dir: /var/lib/docker
Debug Mode: false
Username: ericbsummit
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: true
Anything else?
cat /etc/os-release
NAME="Fedora Linux"
VERSION="38.20230902.3.0 (CoreOS)"
ID=fedora
VERSION_ID=38
VERSION_CODENAME=""
PLATFORM_ID="platform:f38"
PRETTY_NAME="Fedora CoreOS 38.20230902.3.0"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:38"
HOME_URL="https://getfedora.org/coreos/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora-coreos/"
SUPPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
BUG_REPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=38
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=38
SUPPORT_END=2024-05-14
VARIANT="CoreOS"
VARIANT_ID=coreos
OSTREE_VERSION='38.20230902.3.0'