desktop-linux icon indicating copy to clipboard operation
desktop-linux copied to clipboard

Docker Desktop on Arch Linux conflicts with Docker Compose package during installation

Open qumberrizvi opened this issue 2 years ago • 23 comments

  • [x] I have tried with the latest version of Docker Desktop
  • [ ] I have tried disabling enabled experimental features
  • [ ] I have uploaded Diagnostics
  • Diagnostics ID: NA (Can't install Docker Desktop, hence can't use diagnostic tool)

Expected behavior

Docker desktop package should be installed independently of the packages installed for Docker Engine such as Docker Compose.

Actual behavior

Docker desktop package for Arch fails to install if Docker Compose package is already installed on your system with the following error:

failed to commit transaction (conflicting files)
docker-desktop: /usr/lib/docker/cli-plugins/docker-compose exists in filesystem (owned by docker-compose)

Information

  • Linux distro: Manjaro (Arch Linux)
  • Distro version: 22.0.5 (Sikaris)
  • Docker Desktop Version: 4.17.0

Steps to reproduce the behavior

  1. Ensure that you have Docker Engine and Docker Compose already installed
$ sudo pacman -S docker docker-compose
  1. Download the Arch Package
  2. Install the package using the following command:
$ sudo pacman -U ./docker-desktop-<version>-<arch>.pkg.tar.zst

You'll see the following output at the third step which checks for file conflicts -

(3/3) checking for file conflicts [------------------------------------] 100% error: failed to commit transaction (conflicting files) docker-desktop: /usr/lib/docker/cli-plugins/docker-compose exists in filesystem (owned by docker-compose) Errors occurred, no packages were upgraded.

At the time of writing this, I have the following versions of Docker and Docker Compose installed:

  • Docker version 23.0.1, build a5ee5b1
  • Docker Compose version 2.16.0

qumberrizvi avatar Mar 18 '23 14:03 qumberrizvi

I am having the same issue.

gus-skywalker avatar Mar 19 '23 12:03 gus-skywalker

you need delete docker compose sudo pacman -R docker-compose , then you can use instructions, sorry for my english

Valh88 avatar Mar 20 '23 11:03 Valh88

you need delete docker compose sudo pacman -R docker-compose , then you can use instructions, sorry for my english

Yes, that is apparent given it's a conflict.

The issue is that the conflict shouldn't exist between Compose for Engine and Desktop.

qumberrizvi avatar Mar 20 '23 22:03 qumberrizvi

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 30 days.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

docker-robot[bot] avatar Jun 23 '23 01:06 docker-robot[bot]

I can confirm this is still a problem.

Utwo avatar Jun 23 '23 08:06 Utwo

I have created an AUR package based on the official Docker Desktop package that does not conflict with existing Arch packages:

https://aur.archlinux.org/packages/docker-desktop

gustavosbarreto avatar Jul 03 '23 17:07 gustavosbarreto

I resolved the issue by following these steps:

sudo pacman -R docker-compose

This command uninstalls docker-compose.

sudo pacman -U ./docker-desktop-<version>-<arch>.pkg.tar.zst

Installing docker desktop should now work. After a successful installation, navigate to $HOME/.docker and delete the config.json file. Then, in your terminal, enter sudo systemctl restart docker && sudo systemctl enable docker. After that, enter docker login and provide your username and docker token or password.

Go to docker desktop and start it. Both docker desktop and compose should be functioning.

Additional: If desired, restart your PC. Edit: If your containers are not appearing in Docker Desktop, please change the context from "default" to "desktop-linux" and attempt again. To change the context, follow these steps:

  1. Open a terminal and run the command docker context ls.
  2. The output should look like this:
NAME                TYPE                DESCRIPTION                               DOCKER ENDPOINT                                  KUBERNETES ENDPOINT   ORCHESTRATOR
default *           moby                Current DOCKER_HOST based configuration   unix:///var/run/docker.sock                                            
desktop-linux       moby                Docker Desktop                            unix:///home/$USER/.docker/desktop/docker.sock    
  1. Change the context to "desktop-linux" by running the command docker context use desktop-linux.
  2. The output should be:
desktop-linux
Current context is now "desktop-linux"

The containers should now be visible in Docker desktop. You will need to restart the compose file.

aybruhm avatar Oct 13 '23 08:10 aybruhm

@aybruhm

Removing the package is not a solution if you want to use Compose with both Docker Engine and Docker Desktop, hence the conflict issue.

qumberrizvi avatar Oct 13 '23 13:10 qumberrizvi

@aybruhm

Removing the package is not a solution if you want to use Compose with both Docker CLI and Docker Desktop, hence the conflict issue.

After installing Docker Desktop, I was still able to use compose.

aybruhm avatar Oct 13 '23 14:10 aybruhm

@aybruhm

Removing the package is not a solution if you want to use Compose with both Docker CLI and Docker Desktop, hence the conflict issue.

After installing Docker Desktop, I was still able to use compose.

With Docker Engine?

Yup.

aybruhm avatar Oct 13 '23 14:10 aybruhm

@aybruhm

Removing the package is not a solution if you want to use Compose with both Docker CLI and Docker Desktop, hence the conflict issue.

After installing Docker Desktop, I was still able to use compose.

With Docker Engine?

Yup.

Oh I see, you removed the compose package using Pacman but kept the docker package and changed the context. 👍 For some reason I thought you removed Engine as well. 😅

Yes, exactly that.

aybruhm avatar Oct 13 '23 14:10 aybruhm

What if i want to use docker-compose from pacman ?

useEffects avatar Nov 17 '23 17:11 useEffects

conflict between docker-compose and docker-desktop still exist

error: failed to commit transaction (conflicting files)
docker-compose: /usr/lib/docker/cli-plugins/docker-compose exists in filesystem (owned by docker-desktop)
Errors occurred, no packages were upgraded.
 -> error installing repo packages

image

OS: Arch Linux x86_64

3xploiton3 avatar Jan 31 '24 02:01 3xploiton3

Hi, i used 'sudo pacman -R docker-desktop' to remove docker desktop then simply sudo pacman -S docker-compose

anujp3l avatar Feb 27 '24 06:02 anujp3l

  • [x] I have tried with the latest version of Docker Desktop
  • [ ] I have tried disabling enabled experimental features
  • [ ] I have uploaded Diagnostics
  • Diagnostics ID: NA (Can't install Docker Desktop, hence can't use diagnostic tool)

Expected behavior

Docker desktop package should be installed independently of the packages installed for Docker Engine such as Docker Compose.

Actual behavior

Docker desktop package for Arch fails to install if Docker Compose package is already installed on your system with the following error:

failed to commit transaction (conflicting files)
docker-desktop: /usr/lib/docker/cli-plugins/docker-compose exists in filesystem (owned by docker-compose)

Information

  • Linux distro: Manjaro (Arch Linux)
  • Distro version: 22.0.5 (Sikaris)
  • Docker Desktop Version: 4.17.0

Steps to reproduce the behavior

  1. Ensure that you have Docker Engine and Docker Compose already installed
$ sudo pacman -S docker docker-compose
  1. Download the Arch Package
  2. Install the package using the following command:
$ sudo pacman -U ./docker-desktop-<version>-<arch>.pkg.tar.zst

You'll see the following output at the third step which checks for file conflicts -

(3/3) checking for file conflicts [------------------------------------] 100% error: failed to commit transaction (conflicting files) docker-desktop: /usr/lib/docker/cli-plugins/docker-compose exists in filesystem (owned by docker-compose) Errors occurred, no packages were upgraded.

At the time of writing this, I have the following versions of Docker and Docker Compose installed:

  • Docker version 23.0.1, build a5ee5b1
  • Docker Compose version 2.16.0

Don't install docker-compose package, installing docker and docker-desktop is enough also don't use the above aur package by @gustavosbarreto as it is out-dated as of 15-03-24.

Enable 'docker-compose' CLI alias in general settings or use docker compose up -d instead of using docker-compose up -d also don't keep the issue open if is it has been fixed.

image

iEscapedVim avatar Mar 15 '24 09:03 iEscapedVim

Can confirm this is still an issue in 2024. Not sure why this is marked frozen or stale, because users are still hitting this issue when following docs available here: https://docs.docker.com/desktop/install/archlinux/

I was able to resolve it by installing docker-desktop from the AUR using paru, (thank you so very much @gustavosbarreto :pray: ), choosing qemu-full.

I then got a virtualization error from Docker Desktop and so I followed these instructions: https://chatgpt.com/share/49f327fc-fff3-4b93-8727-fcd1ff8f2c80

Gonna have to reboot to see if this works.

cryptoquick avatar Jun 17 '24 00:06 cryptoquick

These instructions aren't working to enable virtualization as required by Docker Desktop: https://docs.docker.com/desktop/install/linux-install/#kvm-virtualization-support

So I'm just going to give up on that and just use the CLI commands for now.

cryptoquick avatar Jun 17 '24 00:06 cryptoquick

➜ Downloads sudo pacman -U ./docker-desktop-4.31.0-x86_64.pkg.tar.zst loading packages... resolving dependencies... looking for conflicting packages...

Packages (2) pass-1.7.4-5 docker-desktop-4.31.0-153195

Total Download Size: 0,02 MiB Total Installed Size: 1359,30 MiB

:: Proceed with installation? [Y/n] :: Retrieving packages... pass-1.7.4-5-any 20,3 KiB 30,3 KiB/s 00:01 [################################################################] 100% (2/2) checking keys in keyring [################################################################] 100% (1/2) checking package integrity [################################################################] 100% (1/2) loading package files [################################################################] 100% (2/2) checking for file conflicts [################################################################] 100%

error: failed to commit transaction (conflicting files) docker-desktop: /usr/lib/docker/cli-plugins/docker-buildx exists in filesystem (owned by docker-buildx) docker-desktop: /usr/lib/docker/cli-plugins/docker-compose exists in filesystem (owned by docker-compose) Errors occurred, no packages were upgraded.

musicrizz avatar Jun 25 '24 21:06 musicrizz

➜ Downloads sudo pacman -U ./docker-desktop-4.31.0-x86_64.pkg.tar.zst loading packages... resolving dependencies... looking for conflicting packages...

Packages (2) pass-1.7.4-5 docker-desktop-4.31.0-153195

Total Download Size: 0,02 MiB Total Installed Size: 1359,30 MiB

:: Proceed with installation? [Y/n] :: Retrieving packages... pass-1.7.4-5-any 20,3 KiB 30,3 KiB/s 00:01 [################################################################] 100% (2/2) checking keys in keyring [################################################################] 100% (1/2) checking package integrity [################################################################] 100% (1/2) loading package files [################################################################] 100% (2/2) checking for file conflicts [################################################################] 100%

error: failed to commit transaction (conflicting files) docker-desktop: /usr/lib/docker/cli-plugins/docker-buildx exists in filesystem (owned by docker-buildx) docker-desktop: /usr/lib/docker/cli-plugins/docker-compose exists in filesystem (owned by docker-compose) Errors occurred, no packages were upgraded.

you have docker-compose & docker-build you need to remove those before you can install this.

iEscapedVim avatar Jun 26 '24 12:06 iEscapedVim

For me using yay -R docker-desktop-debug helps to avoid this bug

PHILIPP111007 avatar Aug 17 '24 09:08 PHILIPP111007