Docker-compose / python3 Fedora - CoreOS 40.20240701.3.0 - SyntaxWarning: invalid escape sequence

I’m getting an error whenever I try to run docker-compose:

user@core:~$ docker-compose
/usr/lib/python3.12/site-packages/docopt.py:165: SyntaxWarning: invalid escape sequence '\S'
  name = re.findall('(<\S*?>)', source)[0]
/usr/lib/python3.12/site-packages/docopt.py:166: SyntaxWarning: invalid escape sequence '\['
  value = re.findall('\[default: (.*)\]', source, flags=re.I)
/usr/lib/python3.12/site-packages/docopt.py:207: SyntaxWarning: invalid escape sequence '\['
  matched = re.findall('\[default: (.*)\]', description, flags=re.I)
/usr/lib/python3.12/site-packages/docopt.py:456: SyntaxWarning: invalid escape sequence '\S'
  split = re.split('\n *(<\S+?>|-\S+?)', doc)[1:]

 

When docker-compose is run it only outputs the above error message and docker-compose usage information, and does not create a container.

The error output occurs even when no docker-compose.yaml file is present.

Is there a workaround for this error?

 

  • docker-compose was installed using rpm-ostree.

  • docker (no compose) runs without giving an error.

 

  • docker-compose version:
user@core:~$ docker-compose -v
docker-compose version 1.29.2, build unknown
  • python version:
user@core:~$ python --version
Python 3.12.4
  • docker version:
user@core:~$ docker -v
Docker version 24.0.5, build %{shortcommit_cli}
  • /etc/os-release contents:
NAME="Fedora Linux"
VERSION="40.20240701.3.0 (CoreOS)"
ID=fedora
VERSION_ID=40
VERSION_CODENAME=""
PLATFORM_ID="platform:f40"
PRETTY_NAME="Fedora CoreOS 40.20240701.3.0"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:40"
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=40
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=40
SUPPORT_END=2025-05-13
VARIANT="CoreOS"
VARIANT_ID=coreos
OSTREE_VERSION='40.20240701.3.0'

Thanks in advance

Hello @animator3041 and welcome to :fedora: !

For further assistance, could you please share the output of sudo rpm-ostree status command.

Hi @hricky , thanks for your reply.

The output is:

user@core:~$ sudo rpm-ostree status
State: idle
AutomaticUpdatesDriver: Zincati
  DriverState: active; periodically polling for updates (last checked Wed 2024-07-24 06:44:35 UTC)
Deployments:
● fedora:fedora/x86_64/coreos/stable
                  Version: 40.20240701.3.0 (2024-07-16T16:03:29Z)
               BaseCommit: 45982eca152d020f23a547813538939e9bfdcfefc8c059e88970d1bbf4ada0bb
             GPGSignature: Valid signature by 115DF9AEF857853EE8445D0A0727707EA15B79CC
          LayeredPackages: dnf docker-compose qemu-guest-agent

  fedora:fedora/x86_64/coreos/stable
                  Version: 40.20240701.3.0 (2024-07-16T16:03:29Z)
               BaseCommit: 45982eca152d020f23a547813538939e9bfdcfefc8c059e88970d1bbf4ada0bb
             GPGSignature: Valid signature by 115DF9AEF857853EE8445D0A0727707EA15B79CC
          LayeredPackages: dnf docker-compose python3 qemu-guest-agent

Not sure what’s causing this issue, but the Docker version in Fedora is outdated, so I would suggest you to replace it with the latest from the upstream Docker sources by Installing Docker CE on a running system.

Then you can install docker-compose.

curl -SL https://github.com/docker/compose/releases/download/v2.29.0/docker-compose-linux-x86_64 | sudo tee /usr/local/bin/docker-compose > /dev/null

sudo chmod +x /usr/local/bin/docker-compose

I’m not using docker-compose, so please give feedback if this solves the issue.

1 Like

Fixed.

Thank you sir.

1 Like

Actually, if you added the Docker repository as I suggested, a better option would be to install the Compose plugin via rpm-ostree.

sudo rpm-ostree install docker-compose-plugin

Thus, Docker CE and Compose should be upgraded automatically with each new release of Fedora CoreOS.