podman: Podman cannot be used by docker-compose when docker binary is installed
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
With user-wide Podman service enabled and DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock environment variable I am unable to successfully run docker-compose up. There is an error message “Server did not provide an image ID. Cannot write /tmp/[…]”. I use Fedora 35 and I have both Docker (moby-engine package) and Podman installed. Problem doesn’t encounter when I replace moby-engine package with podman-docker which provides /usr/bin/docker script calling /usr/bin/podman. This is not solution for me since I need to have both Docker and Podman on my machine. To workaround this issue I use this script saved as podman-compose in my $PATH:
#!/bin/bash
extra_path_dir=$(mktemp -d)
ln -s /usr/bin/podman $extra_path_dir/docker
export PATH="$extra_path_dir:$PATH"
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
exec /usr/bin/docker-compose $@
Steps to reproduce the issue:
On fresh Fedora 35 using my open source app as example:
sudo dnf install -y podman moby-engine docker-compose
systemctl --user enable --now podman.socket
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
mkdir -p ~/.config/containers/
echo 'unqualified-search-registries = ["docker.io"]' > ~/.config/containers/registries.conf
mkdir RadioLista-v3
cd RadioLista-v3
git clone https://github.com/TomaszGasior/RadioLista-v3.git .
docker-compose up
Describe the results you received:
Server did not provide an image ID. Cannot write /tmp/tmp21_z40vw
Describe the results you expected:
I don’t have to sudo dnf swap moby-engine podman-docker and I don’t have to use my wrapper script (of course $DOCKER_HOST is needed always).
Additional information you deem important (e.g. issue happens only occasionally):
Output of podman version:
Version: 3.4.1
API Version: 3.4.1
Go Version: go1.16.8
Built: Wed Oct 20 16:31:56 2021
OS/Arch: linux/amd64
Output of podman info --debug:
host:
arch: amd64
buildahVersion: 1.23.1
cgroupControllers:
- memory
- pids
cgroupManager: systemd
cgroupVersion: v2
conmon:
package: conmon-2.0.30-2.fc35.x86_64
path: /usr/bin/conmon
version: 'conmon version 2.0.30, commit: '
cpus: 4
distribution:
distribution: fedora
variant: workstation
version: "35"
eventLogger: journald
hostname: gasior
idMappings:
gidmap:
- container_id: 0
host_id: 1000
size: 1
- container_id: 1
host_id: 100000
size: 65536
uidmap:
- container_id: 0
host_id: 1000
size: 1
- container_id: 1
host_id: 100000
size: 65536
kernel: 5.14.16-301.fc35.x86_64
linkmode: dynamic
logDriver: journald
memFree: 228278272
memTotal: 12438646784
ociRuntime:
name: crun
package: crun-1.2-1.fc35.x86_64
path: /usr/bin/crun
version: |-
crun version 1.2
commit: 4f6c8e0583c679bfee6a899c05ac6b916022561b
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
os: linux
remoteSocket:
exists: true
path: /run/user/1000/podman/podman.sock
security:
apparmorEnabled: false
capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
rootless: true
seccompEnabled: true
seccompProfilePath: /usr/share/containers/seccomp.json
selinuxEnabled: true
serviceIsRemote: false
slirp4netns:
executable: /usr/bin/slirp4netns
package: slirp4netns-1.1.12-2.fc35.x86_64
version: |-
slirp4netns version 1.1.12
commit: 7a104a101aa3278a2152351a082a6df71f57c9a3
libslirp: 4.6.1
SLIRP_CONFIG_VERSION_MAX: 3
libseccomp: 2.5.2
swapFree: 8562667520
swapTotal: 8589930496
uptime: 3h 12m 44.2s (Approximately 0.12 days)
plugins:
log:
- k8s-file
- none
- journald
network:
- bridge
- macvlan
volume:
- local
registries:
search:
- docker.io
store:
configFile: /home/tomasz/.config/containers/storage.conf
containerStore:
number: 4
paused: 0
running: 4
stopped: 0
graphDriverName: overlay
graphOptions: {}
graphRoot: /home/tomasz/.local/share/containers/storage
graphStatus:
Backing Filesystem: extfs
Native Overlay Diff: "true"
Supports d_type: "true"
Using metacopy: "false"
imageStore:
number: 25
runRoot: /run/user/1000/containers
volumePath: /home/tomasz/.local/share/containers/storage/volumes
version:
APIVersion: 3.4.1
Built: 1634740316
BuiltTime: Wed Oct 20 16:31:56 2021
GitCommit: ""
GoVersion: go1.16.8
OsArch: linux/amd64
Version: 3.4.1
Package info (e.g. output of rpm -q podman or apt list podman):
Name : podman
Epoch : 3
Version : 3.4.1
Release : 1.fc35
Architecture: x86_64
Install Date: sob, 6 lis 2021, 19:18:21
Group : Unspecified
Size : 50202910
License : ASL 2.0
Signature : RSA/SHA256, śro, 20 paź 2021, 20:09:24, Key ID db4639719867c58f
Source RPM : podman-3.4.1-1.fc35.src.rpm
Build Date : śro, 20 paź 2021, 16:31:53
Build Host : buildvm-x86-24.iad2.fedoraproject.org
Packager : Fedora Project
Vendor : Fedora Project
URL : https://podman.io/
Bug URL : https://bugz.fedoraproject.org/podman
Summary : Manage Pods, Containers and Container Images
Description :
podman (Pod Manager) is a fully featured container engine that is a simple
daemonless tool. podman provides a Docker-CLI comparable command line that
eases the transition from other container engines and allows the management of
pods, containers and images. Simply put: alias docker=podman.
Most podman commands can be run as a regular user, without requiring
additional privileges.
podman uses Buildah(1) internally to create container images.
Both tools share image (not container) storage, hence each can use or
manipulate images (but not containers) created by the other.
Manage Pods, Containers and Container Images
podman Simple management tool for pods, containers and images
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Tested also on fresh virtual machine with Fedora 35.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 26 (12 by maintainers)
The issue is still valid. However, I don’t have time to analyze it more. All details I have are provided in the issue. Please reopen.