Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All docker-compose volumes fail with: "Error response from daemon: fill out specgen: /data: duplicate mount destination" #11822

Closed
nyonson opened this issue Oct 1, 2021 · 29 comments · Fixed by #13540
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@nyonson
Copy link

nyonson commented Oct 1, 2021

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

Any docker-compose file which declares a volume is failing.

Steps to reproduce the issue:

  1. Declare a volume in docker-compose.yaml

  2. Run docker-compose up

Describe the results you received:

Error response from daemon: fill out specgen: /data: duplicate mount destination (/data depending on the volume mount locations setting).

Describe the results you expected:

Volume created and containers setup.

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Version:      3.4.0
API Version:  3.4.0
Go Version:   go1.17.1
Git Commit:   6e8de00bb224f9931d7402648f0177e7357ed079
Built:        Fri Oct  1 11:14:18 2021
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.23.1
  cgroupControllers: []
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: /usr/bin/conmon is owned by conmon 1:2.0.30-1
    path: /usr/bin/conmon
    version: 'conmon version 2.0.30, commit: 2792c16f4436f1887a7070d9ad99d9c29742f38a'
  cpus: 8
  distribution:
    distribution: arch
    version: unknown
  eventLogger: journald
  hostname: mercury2
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65537
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65537
  kernel: 5.14.8-arch1-1
  linkmode: dynamic
  logDriver: journald
  memFree: 39771189248
  memTotal: 41912086528
  ociRuntime:
    name: crun
    package: /usr/bin/crun is owned by crun 1.1-1
    path: /usr/bin/crun
    version: |-
      crun version 1.1
      commit: 5b341a145c4f515f96f55e3e7760d1c79ec3cf1f
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +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: /etc/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: /usr/bin/slirp4netns is owned by slirp4netns 1.1.12-1
    version: |-
      slirp4netns version 1.1.12
      commit: 7a104a101aa3278a2152351a082a6df71f57c9a3
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.2
  swapFree: 0
  swapTotal: 0
  uptime: 16m 19.2s
plugins:
  log:
  - k8s-file
  - none
  - journald
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /home/njohnson/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/njohnson/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 5
  runRoot: /run/user/1000/containers
  volumePath: /home/njohnson/.local/share/containers/storage/volumes
version:
  APIVersion: 3.4.0
  Built: 1633083258
  BuiltTime: Fri Oct  1 11:14:18 2021
  GitCommit: 6e8de00bb224f9931d7402648f0177e7357ed079
  GoVersion: go1.17.1
  OsArch: linux/amd64
  Version: 3.4.0

Package info (e.g. output of rpm -q podman or apt list podman):

Name            : podman
Version         : 3.4.0-1
Description     : Tool and library for running OCI-based containers in pods
Architecture    : x86_64
URL             : https://github.com/containers/podman
Licenses        : Apache
Groups          : None
Provides        : None
Depends On      : cni-plugins  conmon  containers-common  crun  fuse-overlayfs  iptables  libdevmapper.so=1.02-64  libgpgme.so=11-64  libseccomp.so=2-64  slirp4netns
Optional Deps   : apparmor: for AppArmor support
                  btrfs-progs: support btrfs backend devices
                  catatonit: --init flag support
                  podman-docker: for Docker-compatible CLI [installed]
Required By     : podman-docker
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 72.66 MiB
Packager        : David Runge <dvzrv@archlinux.org>
Build Date      : Fri 01 Oct 2021 11:14:18 AM BST
Install Date    : Fri 01 Oct 2021 12:05:52 PM BST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

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.):

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 1, 2021
@Luap99
Copy link
Member

Luap99 commented Oct 1, 2021

Can you please share your docker-compose.yml file.

@nyonson
Copy link
Author

nyonson commented Oct 1, 2021

It's reproducible on the demo docker compose files for me: https://github.com/docker/awesome-compose/blob/master/gitea-postgres/docker-compose.yaml

@Luap99
Copy link
Member

Luap99 commented Oct 1, 2021

This compose file works for me, can you share more details.

@nyonson
Copy link
Author

nyonson commented Oct 1, 2021

This has started recently (within the last month), but was not due to the recent upgrade to 3.4.0. It was all effecting me on 3.3.1.

I am running podman as a user service with systemctl:

> systemctl --user status podman.socket
● podman.socket - Podman API Socket
     Loaded: loaded (/usr/lib/systemd/user/podman.socket; enabled; vendor preset: enabled)
     Active: active (listening) since Fri 2021-10-01 12:06:59 BST; 2h 42min ago
   Triggers: ● podman.service
       Docs: man:podman-system-service(1)
     Listen: /run/user/1000/podman/podman.sock (Stream)
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/podman.socket

And have the DOCKER_HOST environment variable set:

> echo $DOCKER_HOST
unix:///run/user/1000/podman/podman.sock

I don't have any configuration under ~/.config/containers so I believe I am running things pretty standard.

@mheon
Copy link
Member

mheon commented Oct 1, 2021

Please provide all containers.conf files - /usr/share/containers/containers.conf, /etc/containers/containers.conf, ~/.config/containers/containers.conf - most logical explanation is an extra volume from the config in one of those.

@nyonson
Copy link
Author

nyonson commented Oct 1, 2021

/usr/share/containers/containers.conf

> cat /usr/share/containers/containers.conf
# The containers configuration file specifies all of the available configuration
# command-line options/flags for container engine tools like Podman & Buildah,
# but in a TOML format that can be easily modified and versioned.

# Please refer to containers.conf(5) for details of all configuration options.
# Not all container engines implement all of the options.
# All of the options have hard coded defaults and these options will override
# the built in defaults. Users can then override these options via the command
# line. Container engines will read containers.conf files in up to three
# locations in the following order:
#  1. /usr/share/containers/containers.conf
#  2. /etc/containers/containers.conf
#  3. $HOME/.config/containers/containers.conf (Rootless containers ONLY)
#  Items specified in the latter containers.conf, if they exist, override the
# previous containers.conf settings, or the default settings.

[containers]

# List of annotation. Specified as
# "key = value"
# If it is empty or commented out, no annotations will be added
#
#annotations = []

# Used to change the name of the default AppArmor profile of container engine.
#
#apparmor_profile = "container-default"

# Default way to to create a cgroup namespace for the container
# Options are:
# `private` Create private Cgroup Namespace for the container.
# `host`    Share host Cgroup Namespace with the container.
#
#cgroupns = "private"

# Control container cgroup configuration
# Determines  whether  the  container will create CGroups.
# Options are:
# `enabled`   Enable cgroup support within container
# `disabled`  Disable cgroup support, will inherit cgroups from parent
# `no-conmon` Do not create a cgroup dedicated to conmon.
#
#cgroups = "enabled"

# List of default capabilities for containers. If it is empty or commented out,
# the default capabilities defined in the container engine will be added.
#
default_capabilities = [
  "CHOWN",
  "DAC_OVERRIDE",
  "FOWNER",
  "FSETID",
  "KILL",
  "NET_BIND_SERVICE",
  "SETFCAP",
  "SETGID",
  "SETPCAP",
  "SETUID",
  "SYS_CHROOT"
]

# A list of sysctls to be set in containers by default,
# specified as "name=value",
# for example:"net.ipv4.ping_group_range=0 0".
#
default_sysctls = [
  "net.ipv4.ping_group_range=0 0",
]

# A list of ulimits to be set in containers by default, specified as
# "<ulimit name>=<soft limit>:<hard limit>", for example:
# "nofile=1024:2048"
# See setrlimit(2) for a list of resource names.
# Any limit not specified here will be inherited from the process launching the
# container engine.
# Ulimits has limits for non privileged container engines.
#
#default_ulimits = [
#  "nofile=1280:2560",
#]

# List of devices. Specified as
# "<device-on-host>:<device-on-container>:<permissions>", for example:
# "/dev/sdc:/dev/xvdc:rwm".
# If it is empty or commented out, only the default devices will be used
#
#devices = []

# List of default DNS options to be added to /etc/resolv.conf inside of the container.
#
#dns_options = []

# List of default DNS search domains to be added to /etc/resolv.conf inside of the container.
#
#dns_searches = []

# Set default DNS servers.
# This option can be used to override the DNS configuration passed to the
# container. The special value "none" can be specified to disable creation of
# /etc/resolv.conf in the container.
# The /etc/resolv.conf file in the image will be used without changes.
#
#dns_servers = []

# Environment variable list for the conmon process; used for passing necessary
# environment variables to conmon or the runtime.
#
#env = [
#  "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
#  "TERM=xterm",
#]

# Pass all host environment variables into the container.
#
#env_host = false

# Default proxy environment variables passed into the container.
# The environment variables passed in include:
# http_proxy, https_proxy, ftp_proxy, no_proxy, and the upper case versions of
# these. This option is needed when host system uses a proxy but container
# should not use proxy. Proxy environment variables specified for the container
# in any other way will override the values passed from the host.
#
#http_proxy = true

# Run an init inside the container that forwards signals and reaps processes.
#
#init = false

# Container init binary, if init=true, this is the init binary to be used for containers.
#
#init_path = "/usr/libexec/podman/catatonit"

# Default way to to create an IPC namespace (POSIX SysV IPC) for the container
# Options are:
# `private` Create private IPC Namespace for the container.
# `host`    Share host IPC Namespace with the container.
#
#ipcns = "private"

# keyring tells the container engine whether to create
# a kernel keyring for use within the container.
#
#keyring = true

# label tells the container engine whether to use container separation using
# MAC(SELinux) labeling or not.
# The label flag is ignored on label disabled systems.
#
#label = true

# Logging driver for the container. Available options: k8s-file and journald.
#
#log_driver = "k8s-file"

# Maximum size allowed for the container log file. Negative numbers indicate
# that no size limit is imposed. If positive, it must be >= 8192 to match or
# exceed conmon's read buffer. The file is truncated and re-opened so the
# limit is never exceeded.
#
#log_size_max = -1

# Specifies default format tag for container log messages.
# This is useful for creating a specific tag for container log messages.
# Containers logs default to truncated container ID as a tag.
#
#log_tag = ""

# Default way to to create a Network namespace for the container
# Options are:
# `private` Create private Network Namespace for the container.
# `host`    Share host Network Namespace with the container.
# `none`    Containers do not use the network
#
#netns = "private"

# Create /etc/hosts for the container.  By default, container engine manage
# /etc/hosts, automatically adding  the container's  own  IP  address.
#
#no_hosts = false

# Default way to to create a PID namespace for the container
# Options are:
# `private` Create private PID Namespace for the container.
# `host`    Share host PID Namespace with the container.
#
#pidns = "private"

# Maximum number of processes allowed in a container.
#
#pids_limit = 2048

# Copy the content from the underlying image into the newly created volume
# when the container is created instead of when it is started. If false,
# the container engine will not copy the content until the container is started.
# Setting it to true may have negative performance implications.
#
#prepare_volume_on_create = false

# Indicates the networking to be used for rootless containers
#
#rootless_networking = "slirp4netns"

# Path to the seccomp.json profile which is used as the default seccomp profile
# for the runtime.
#
#seccomp_profile = "/usr/share/containers/seccomp.json"

# Size of /dev/shm. Specified as <number><unit>.
# Unit is optional, values:
# b (bytes), k (kilobytes), m (megabytes), or g (gigabytes).
# If the unit is omitted, the system uses bytes.
#
#shm_size = "65536k"

# Set timezone in container. Takes IANA timezones as well as "local",
# which sets the timezone in the container to match the host machine.
#
#tz = ""

# Set umask inside the container
#
#umask = "0022"

# Default way to to create a User namespace for the container
# Options are:
# `auto`        Create unique User Namespace for the container.
# `host`    Share host User Namespace with the container.
#
#userns = "host"

# Number of UIDs to allocate for the automatic container creation.
# UIDs are allocated from the "container" UIDs listed in
# /etc/subuid & /etc/subgid
#
#userns_size = 65536

# Default way to to create a UTS namespace for the container
# Options are:
# `private`        Create private UTS Namespace for the container.
# `host`    Share host UTS Namespace with the container.
#
#utsns = "private"

# List of volumes. Specified as
# "<directory-on-host>:<directory-in-container>:<options>", for example:
# "/db:/var/lib/db:ro".
# If it is empty or commented out, no volumes will be added
#
#volumes = []

# The network table contains settings pertaining to the management of
# CNI plugins.

[secrets]
#driver = "file"

[secrets.opts]
#root = "/example/directory"

[network]

# Path to directory where CNI plugin binaries are located.
#
#cni_plugin_dirs = [
#  "/usr/local/libexec/cni",
#  "/usr/libexec/cni",
#  "/usr/local/lib/cni",
#  "/usr/lib/cni",
#  "/opt/cni/bin",
#]

# The network name of the default CNI network to attach pods to.
#
#default_network = "podman"

# The default subnet for the default CNI network given in default_network.
# If a network with that name does not exist, a new network using that name and
# this subnet will be created.
# Must be a valid IPv4 CIDR prefix.
#
#default_subnet = "10.88.0.0/16"

# Path to the directory where CNI configuration files are located.
#
#network_config_dir = "/etc/cni/net.d/"

[engine]
# Index to the active service
#
#active_service = production

# Cgroup management implementation used for the runtime.
# Valid options "systemd" or "cgroupfs"
#
#cgroup_manager = "systemd"

# Environment variables to pass into conmon
#
#conmon_env_vars = [
#  "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
#]

# Paths to look for the conmon container manager binary
#
#conmon_path = [
#  "/usr/libexec/podman/conmon",
#  "/usr/local/libexec/podman/conmon",
#  "/usr/local/lib/podman/conmon",
#  "/usr/bin/conmon",
#  "/usr/sbin/conmon",
#  "/usr/local/bin/conmon",
#  "/usr/local/sbin/conmon"
#]

# Specify the keys sequence used to detach a container.
# Format is a single character [a-Z] or a comma separated sequence of
# `ctrl-<value>`, where `<value>` is one of:
# `a-z`, `@`, `^`, `[`, `\`, `]`, `^` or `_`
#
#detach_keys = "ctrl-p,ctrl-q"

# Determines whether engine will reserve ports on the host when they are
# forwarded to containers. When enabled, when ports are forwarded to containers,
# ports are held open by as long as the container is running, ensuring that
# they cannot be reused by other programs on the host. However, this can cause
# significant memory usage if a container has many ports forwarded to it.
# Disabling this can save memory.
#
#enable_port_reservation = true

# Environment variables to be used when running the container engine (e.g., Podman, Buildah).
# For example "http_proxy=internal.proxy.company.com".
# Note these environment variables will not be used within the container.
# Set the env section under [containers] table, if you want to set environment variables for the container.
#
#env = []

# Selects which logging mechanism to use for container engine events.
# Valid values are `journald`, `file` and `none`.
#
#events_logger = "journald"

# A is a list of directories which are used to search for helper binaries.
#
#helper_binaries_dir = [
#  "/usr/local/libexec/podman",
#  "/usr/local/lib/podman",
#  "/usr/libexec/podman",
#  "/usr/lib/podman",
#]

# Path to OCI hooks directories for automatically executed hooks.
#
#hooks_dir = [
#  "/usr/share/containers/oci/hooks.d",
#]

# Manifest Type (oci, v2s2, or v2s1) to use when pulling, pushing, building
# container images. By default image pulled and pushed match the format of the
# source image. Building/committing defaults to OCI.
#
#image_default_format = ""

# Default transport method for pulling and pushing for images
#
#image_default_transport = "docker://"

# Maximum number of image layers to be copied (pulled/pushed) simultaneously.
# Not setting this field, or setting it to zero, will fall back to containers/image defaults.
#
#image_parallel_copies = 0

# Default command to run the infra container
#
#infra_command = "/pause"

# Infra (pause) container image name for pod infra containers.  When running a
# pod, we start a `pause` process in a container to hold open the namespaces
# associated with the  pod.  This container does nothing other then sleep,
# reserving the pods resources for the lifetime of the pod.
#
#infra_image = "k8s.gcr.io/pause:3.4.1"

# Specify the locking mechanism to use; valid values are "shm" and "file".
# Change the default only if you are sure of what you are doing, in general
# "file" is useful only on platforms where cgo is not available for using the
# faster "shm" lock type.  You may need to run "podman system renumber" after
# you change the lock type.
#
#lock_type** = "shm"

# Indicates if Podman is running inside a VM via Podman Machine.
# Podman uses this value to do extra setup around networking from the
# container inside the VM to to host.
#
#machine_enabled = false

# MultiImageArchive - if true, the container engine allows for storing archives
# (e.g., of the docker-archive transport) with multiple images.  By default,
# Podman creates single-image archives.
#
#multi_image_archive = "false"

# Default engine namespace
# If engine is joined to a namespace, it will see only containers and pods
# that were created in the same namespace, and will create new containers and
# pods in that namespace.
# The default namespace is "", which corresponds to no namespace. When no
# namespace is set, all containers and pods are visible.
#
#namespace = ""

# Path to the slirp4netns binary
#
#network_cmd_path = ""

# Default options to pass to the slirp4netns binary.
# For example "allow_host_loopback=true"
#
#network_cmd_options = ["enable_ipv6=true",]

# Whether to use chroot instead of pivot_root in the runtime
#
#no_pivot_root = false

# Number of locks available for containers and pods.
# If this is changed, a lock renumber must be performed (e.g. with the
# 'podman system renumber' command).
#
#num_locks = 2048

# Whether to pull new image before running a container
#
#pull_policy = "missing"

# Indicates whether the application should be running in remote mode. This flag modifies the
# --remote option on container engines. Setting the flag to true will default
# `podman --remote=true` for access to the remote Podman service.
#
#remote = false

# Default OCI runtime
#
#runtime = "crun"

# List of the OCI runtimes that support --format=json.  When json is supported
# engine will use it for reporting nicer errors.
#
#runtime_supports_json = ["crun", "runc", "kata", "runsc", "krun"]

# List of the OCI runtimes that supports running containers with KVM Separation.
#
#runtime_supports_kvm = ["kata", "krun"]

# List of the OCI runtimes that supports running containers without cgroups.
#
#runtime_supports_nocgroups = ["crun", "krun"]

# Default location for storing temporary container image content.  Can be overridden with the TMPDIR environment
# variable.  If you specify "storage", then the location of the
# container/storage tmp directory will be used.
# image_copy_tmp_dir="/var/tmp"

# Number of seconds to wait without a connection
# before the `podman system service` times out and exits
#
#service_timeout = 5

# Directory for persistent engine files (database, etc)
# By default, this will be configured relative to where the containers/storage
# stores containers
# Uncomment to change location from this default
#
#static_dir = "/var/lib/containers/storage/libpod"

# Number of seconds to wait for container to exit before sending kill signal.
#
#stop_timeout = 10

# map of service destinations
#
#[service_destinations]
#  [service_destinations.production]
#     URI to access the Podman service
#     Examples:
#       rootless "unix://run/user/$UID/podman/podman.sock" (Default)
#       rootfull "unix://run/podman/podman.sock (Default)
#       remote rootless ssh://engineering.lab.company.com/run/user/1000/podman/podman.sock
#       remote rootfull ssh://root@10.10.1.136:22/run/podman/podman.sock
#
#    uri = "ssh://user@production.example.com/run/user/1001/podman/podman.sock"
#    Path to file containing ssh identity key
#    identity = "~/.ssh/id_rsa"

# Directory for temporary files. Must be tmpfs (wiped after reboot)
#
#tmp_dir = "/run/libpod"

# Directory for libpod named volumes.
# By default, this will be configured relative to where containers/storage
# stores containers.
# Uncomment to change location from this default.
#
#volume_path = "/var/lib/containers/storage/volumes"

# Paths to look for a valid OCI runtime (crun, runc, kata, runsc, krun, etc)
[engine.runtimes]
#crun = [
#  "/usr/bin/crun",
#  "/usr/sbin/crun",
#  "/usr/local/bin/crun",
#  "/usr/local/sbin/crun",
#  "/sbin/crun",
#  "/bin/crun",
#  "/run/current-system/sw/bin/crun",
#]

#kata = [
#  "/usr/bin/kata-runtime",
#  "/usr/sbin/kata-runtime",
#  "/usr/local/bin/kata-runtime",
#  "/usr/local/sbin/kata-runtime",
#  "/sbin/kata-runtime",
#  "/bin/kata-runtime",
#  "/usr/bin/kata-qemu",
#  "/usr/bin/kata-fc",
#]

#runc = [
#  "/usr/bin/runc",
#  "/usr/sbin/runc",
#  "/usr/local/bin/runc",
#  "/usr/local/sbin/runc",
#  "/sbin/runc",
#  "/bin/runc",
#  "/usr/lib/cri-o-runc/sbin/runc",
#]

#runsc = [
#  "/usr/bin/runsc",
#  "/usr/sbin/runsc",
#  "/usr/local/bin/runsc",
#  "/usr/local/sbin/runsc",
#  "/bin/runsc",
#  "/sbin/runsc",
#  "/run/current-system/sw/bin/runsc",
#]

#krun = [
#  "/usr/bin/krun",
#  "/usr/local/bin/krun",
#]

[engine.volume_plugins]
#testplugin = "/run/podman/plugins/test.sock"

[machine]
# Number of CPU's a machine is created with.
#
#cpus=1

# The size of the disk in GB created when init-ing a podman-machine VM.
#
#disk_size=10

# The image used when creating a podman-machine VM.
#
#image = "testing"

# Memory in MB a machine is created with.
#
#memory=2048

# The [machine] table MUST be the last entry in this file.
# (Unless another table is added)
# TOML does not provide a way to end a table other than a further table being
# defined, so every key hereafter will be part of [machine] and not the
# main config.

/etc/containers/containers.conf

> cat /etc/containers/containers.conf
# The containers configuration file specifies all of the available configuration
# command-line options/flags for container engine tools like Podman & Buildah,
# but in a TOML format that can be easily modified and versioned.

# Please refer to containers.conf(5) for details of all configuration options.
# Not all container engines implement all of the options.
# All of the options have hard coded defaults and these options will override
# the built in defaults. Users can then override these options via the command
# line. Container engines will read containers.conf files in up to three
# locations in the following order:
#  1. /usr/share/containers/containers.conf
#  2. /etc/containers/containers.conf
#  3. $HOME/.config/containers/containers.conf (Rootless containers ONLY)
#  Items specified in the latter containers.conf, if they exist, override the
# previous containers.conf settings, or the default settings.

[containers]

# List of annotation. Specified as
# "key = value"
# If it is empty or commented out, no annotations will be added
#
#annotations = []

# Used to change the name of the default AppArmor profile of container engine.
#
#apparmor_profile = "container-default"

# Default way to to create a cgroup namespace for the container
# Options are:
# `private` Create private Cgroup Namespace for the container.
# `host`    Share host Cgroup Namespace with the container.
#
#cgroupns = "private"

# Control container cgroup configuration
# Determines  whether  the  container will create CGroups.
# Options are:
# `enabled`   Enable cgroup support within container
# `disabled`  Disable cgroup support, will inherit cgroups from parent
# `no-conmon` Do not create a cgroup dedicated to conmon.
#
#cgroups = "enabled"

# List of default capabilities for containers. If it is empty or commented out,
# the default capabilities defined in the container engine will be added.
#
default_capabilities = [
  "CHOWN",
  "DAC_OVERRIDE",
  "FOWNER",
  "FSETID",
  "KILL",
  "NET_BIND_SERVICE",
  "SETFCAP",
  "SETGID",
  "SETPCAP",
  "SETUID",
  "SYS_CHROOT"
]

# A list of sysctls to be set in containers by default,
# specified as "name=value",
# for example:"net.ipv4.ping_group_range=0 0".
#
default_sysctls = [
  "net.ipv4.ping_group_range=0 0",
]

# A list of ulimits to be set in containers by default, specified as
# "<ulimit name>=<soft limit>:<hard limit>", for example:
# "nofile=1024:2048"
# See setrlimit(2) for a list of resource names.
# Any limit not specified here will be inherited from the process launching the
# container engine.
# Ulimits has limits for non privileged container engines.
#
#default_ulimits = [
#  "nofile=1280:2560",
#]

# List of devices. Specified as
# "<device-on-host>:<device-on-container>:<permissions>", for example:
# "/dev/sdc:/dev/xvdc:rwm".
# If it is empty or commented out, only the default devices will be used
#
#devices = []

# List of default DNS options to be added to /etc/resolv.conf inside of the container.
#
#dns_options = []

# List of default DNS search domains to be added to /etc/resolv.conf inside of the container.
#
#dns_searches = []

# Set default DNS servers.
# This option can be used to override the DNS configuration passed to the
# container. The special value "none" can be specified to disable creation of
# /etc/resolv.conf in the container.
# The /etc/resolv.conf file in the image will be used without changes.
#
#dns_servers = []

# Environment variable list for the conmon process; used for passing necessary
# environment variables to conmon or the runtime.
#
#env = [
#  "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
#  "TERM=xterm",
#]

# Pass all host environment variables into the container.
#
#env_host = false

# Default proxy environment variables passed into the container.
# The environment variables passed in include:
# http_proxy, https_proxy, ftp_proxy, no_proxy, and the upper case versions of
# these. This option is needed when host system uses a proxy but container
# should not use proxy. Proxy environment variables specified for the container
# in any other way will override the values passed from the host.
#
#http_proxy = true

# Run an init inside the container that forwards signals and reaps processes.
#
#init = false

# Container init binary, if init=true, this is the init binary to be used for containers.
#
#init_path = "/usr/libexec/podman/catatonit"

# Default way to to create an IPC namespace (POSIX SysV IPC) for the container
# Options are:
# `private` Create private IPC Namespace for the container.
# `host`    Share host IPC Namespace with the container.
#
#ipcns = "private"

# keyring tells the container engine whether to create
# a kernel keyring for use within the container.
#
#keyring = true

# label tells the container engine whether to use container separation using
# MAC(SELinux) labeling or not.
# The label flag is ignored on label disabled systems.
#
#label = true

# Logging driver for the container. Available options: k8s-file and journald.
#
#log_driver = "k8s-file"

# Maximum size allowed for the container log file. Negative numbers indicate
# that no size limit is imposed. If positive, it must be >= 8192 to match or
# exceed conmon's read buffer. The file is truncated and re-opened so the
# limit is never exceeded.
#
#log_size_max = -1

# Specifies default format tag for container log messages.
# This is useful for creating a specific tag for container log messages.
# Containers logs default to truncated container ID as a tag.
#
#log_tag = ""

# Default way to to create a Network namespace for the container
# Options are:
# `private` Create private Network Namespace for the container.
# `host`    Share host Network Namespace with the container.
# `none`    Containers do not use the network
#
#netns = "private"

# Create /etc/hosts for the container.  By default, container engine manage
# /etc/hosts, automatically adding  the container's  own  IP  address.
#
#no_hosts = false

# Default way to to create a PID namespace for the container
# Options are:
# `private` Create private PID Namespace for the container.
# `host`    Share host PID Namespace with the container.
#
#pidns = "private"

# Maximum number of processes allowed in a container.
#
#pids_limit = 2048

# Copy the content from the underlying image into the newly created volume
# when the container is created instead of when it is started. If false,
# the container engine will not copy the content until the container is started.
# Setting it to true may have negative performance implications.
#
#prepare_volume_on_create = false

# Indicates the networking to be used for rootless containers
#
#rootless_networking = "slirp4netns"

# Path to the seccomp.json profile which is used as the default seccomp profile
# for the runtime.
#
#seccomp_profile = "/usr/share/containers/seccomp.json"

# Size of /dev/shm. Specified as <number><unit>.
# Unit is optional, values:
# b (bytes), k (kilobytes), m (megabytes), or g (gigabytes).
# If the unit is omitted, the system uses bytes.
#
#shm_size = "65536k"

# Set timezone in container. Takes IANA timezones as well as "local",
# which sets the timezone in the container to match the host machine.
#
#tz = ""

# Set umask inside the container
#
#umask = "0022"

# Default way to to create a User namespace for the container
# Options are:
# `auto`        Create unique User Namespace for the container.
# `host`    Share host User Namespace with the container.
#
#userns = "host"

# Number of UIDs to allocate for the automatic container creation.
# UIDs are allocated from the "container" UIDs listed in
# /etc/subuid & /etc/subgid
#
#userns_size = 65536

# Default way to to create a UTS namespace for the container
# Options are:
# `private`        Create private UTS Namespace for the container.
# `host`    Share host UTS Namespace with the container.
#
#utsns = "private"

# List of volumes. Specified as
# "<directory-on-host>:<directory-in-container>:<options>", for example:
# "/db:/var/lib/db:ro".
# If it is empty or commented out, no volumes will be added
#
#volumes = []

# The network table contains settings pertaining to the management of
# CNI plugins.

[secrets]
#driver = "file"

[secrets.opts]
#root = "/example/directory"

[network]

# Path to directory where CNI plugin binaries are located.
#
#cni_plugin_dirs = [
#  "/usr/local/libexec/cni",
#  "/usr/libexec/cni",
#  "/usr/local/lib/cni",
#  "/usr/lib/cni",
#  "/opt/cni/bin",
#]

# The network name of the default CNI network to attach pods to.
#
#default_network = "podman"

# The default subnet for the default CNI network given in default_network.
# If a network with that name does not exist, a new network using that name and
# this subnet will be created.
# Must be a valid IPv4 CIDR prefix.
#
#default_subnet = "10.88.0.0/16"

# Path to the directory where CNI configuration files are located.
#
#network_config_dir = "/etc/cni/net.d/"

[engine]
# Index to the active service
#
#active_service = production

# Cgroup management implementation used for the runtime.
# Valid options "systemd" or "cgroupfs"
#
#cgroup_manager = "systemd"

# Environment variables to pass into conmon
#
#conmon_env_vars = [
#  "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
#]

# Paths to look for the conmon container manager binary
#
#conmon_path = [
#  "/usr/libexec/podman/conmon",
#  "/usr/local/libexec/podman/conmon",
#  "/usr/local/lib/podman/conmon",
#  "/usr/bin/conmon",
#  "/usr/sbin/conmon",
#  "/usr/local/bin/conmon",
#  "/usr/local/sbin/conmon"
#]

# Specify the keys sequence used to detach a container.
# Format is a single character [a-Z] or a comma separated sequence of
# `ctrl-<value>`, where `<value>` is one of:
# `a-z`, `@`, `^`, `[`, `\`, `]`, `^` or `_`
#
#detach_keys = "ctrl-p,ctrl-q"

# Determines whether engine will reserve ports on the host when they are
# forwarded to containers. When enabled, when ports are forwarded to containers,
# ports are held open by as long as the container is running, ensuring that
# they cannot be reused by other programs on the host. However, this can cause
# significant memory usage if a container has many ports forwarded to it.
# Disabling this can save memory.
#
#enable_port_reservation = true

# Environment variables to be used when running the container engine (e.g., Podman, Buildah).
# For example "http_proxy=internal.proxy.company.com".
# Note these environment variables will not be used within the container.
# Set the env section under [containers] table, if you want to set environment variables for the container.
#
#env = []

# Selects which logging mechanism to use for container engine events.
# Valid values are `journald`, `file` and `none`.
#
#events_logger = "journald"

# A is a list of directories which are used to search for helper binaries.
#
#helper_binaries_dir = [
#  "/usr/local/libexec/podman",
#  "/usr/local/lib/podman",
#  "/usr/libexec/podman",
#  "/usr/lib/podman",
#]

# Path to OCI hooks directories for automatically executed hooks.
#
#hooks_dir = [
#  "/usr/share/containers/oci/hooks.d",
#]

# Manifest Type (oci, v2s2, or v2s1) to use when pulling, pushing, building
# container images. By default image pulled and pushed match the format of the
# source image. Building/committing defaults to OCI.
#
#image_default_format = ""

# Default transport method for pulling and pushing for images
#
#image_default_transport = "docker://"

# Maximum number of image layers to be copied (pulled/pushed) simultaneously.
# Not setting this field, or setting it to zero, will fall back to containers/image defaults.
#
#image_parallel_copies = 0

# Default command to run the infra container
#
#infra_command = "/pause"

# Infra (pause) container image name for pod infra containers.  When running a
# pod, we start a `pause` process in a container to hold open the namespaces
# associated with the  pod.  This container does nothing other then sleep,
# reserving the pods resources for the lifetime of the pod.
#
#infra_image = "k8s.gcr.io/pause:3.4.1"

# Specify the locking mechanism to use; valid values are "shm" and "file".
# Change the default only if you are sure of what you are doing, in general
# "file" is useful only on platforms where cgo is not available for using the
# faster "shm" lock type.  You may need to run "podman system renumber" after
# you change the lock type.
#
#lock_type** = "shm"

# Indicates if Podman is running inside a VM via Podman Machine.
# Podman uses this value to do extra setup around networking from the
# container inside the VM to to host.
#
#machine_enabled = false

# MultiImageArchive - if true, the container engine allows for storing archives
# (e.g., of the docker-archive transport) with multiple images.  By default,
# Podman creates single-image archives.
#
#multi_image_archive = "false"

# Default engine namespace
# If engine is joined to a namespace, it will see only containers and pods
# that were created in the same namespace, and will create new containers and
# pods in that namespace.
# The default namespace is "", which corresponds to no namespace. When no
# namespace is set, all containers and pods are visible.
#
#namespace = ""

# Path to the slirp4netns binary
#
#network_cmd_path = ""

# Default options to pass to the slirp4netns binary.
# For example "allow_host_loopback=true"
#
#network_cmd_options = ["enable_ipv6=true",]

# Whether to use chroot instead of pivot_root in the runtime
#
#no_pivot_root = false

# Number of locks available for containers and pods.
# If this is changed, a lock renumber must be performed (e.g. with the
# 'podman system renumber' command).
#
#num_locks = 2048

# Whether to pull new image before running a container
#
#pull_policy = "missing"

# Indicates whether the application should be running in remote mode. This flag modifies the
# --remote option on container engines. Setting the flag to true will default
# `podman --remote=true` for access to the remote Podman service.
#
#remote = false

# Default OCI runtime
#
#runtime = "crun"

# List of the OCI runtimes that support --format=json.  When json is supported
# engine will use it for reporting nicer errors.
#
#runtime_supports_json = ["crun", "runc", "kata", "runsc", "krun"]

# List of the OCI runtimes that supports running containers with KVM Separation.
#
#runtime_supports_kvm = ["kata", "krun"]

# List of the OCI runtimes that supports running containers without cgroups.
#
#runtime_supports_nocgroups = ["crun", "krun"]

# Default location for storing temporary container image content.  Can be overridden with the TMPDIR environment
# variable.  If you specify "storage", then the location of the
# container/storage tmp directory will be used.
# image_copy_tmp_dir="/var/tmp"

# Number of seconds to wait without a connection
# before the `podman system service` times out and exits
#
#service_timeout = 5

# Directory for persistent engine files (database, etc)
# By default, this will be configured relative to where the containers/storage
# stores containers
# Uncomment to change location from this default
#
#static_dir = "/var/lib/containers/storage/libpod"

# Number of seconds to wait for container to exit before sending kill signal.
#
#stop_timeout = 10

# map of service destinations
#
#[service_destinations]
#  [service_destinations.production]
#     URI to access the Podman service
#     Examples:
#       rootless "unix://run/user/$UID/podman/podman.sock" (Default)
#       rootfull "unix://run/podman/podman.sock (Default)
#       remote rootless ssh://engineering.lab.company.com/run/user/1000/podman/podman.sock
#       remote rootfull ssh://root@10.10.1.136:22/run/podman/podman.sock
#
#    uri = "ssh://user@production.example.com/run/user/1001/podman/podman.sock"
#    Path to file containing ssh identity key
#    identity = "~/.ssh/id_rsa"

# Directory for temporary files. Must be tmpfs (wiped after reboot)
#
#tmp_dir = "/run/libpod"

# Directory for libpod named volumes.
# By default, this will be configured relative to where containers/storage
# stores containers.
# Uncomment to change location from this default.
#
#volume_path = "/var/lib/containers/storage/volumes"

# Paths to look for a valid OCI runtime (crun, runc, kata, runsc, krun, etc)
[engine.runtimes]
#crun = [
#  "/usr/bin/crun",
#  "/usr/sbin/crun",
#  "/usr/local/bin/crun",
#  "/usr/local/sbin/crun",
#  "/sbin/crun",
#  "/bin/crun",
#  "/run/current-system/sw/bin/crun",
#]

#kata = [
#  "/usr/bin/kata-runtime",
#  "/usr/sbin/kata-runtime",
#  "/usr/local/bin/kata-runtime",
#  "/usr/local/sbin/kata-runtime",
#  "/sbin/kata-runtime",
#  "/bin/kata-runtime",
#  "/usr/bin/kata-qemu",
#  "/usr/bin/kata-fc",
#]

#runc = [
#  "/usr/bin/runc",
#  "/usr/sbin/runc",
#  "/usr/local/bin/runc",
#  "/usr/local/sbin/runc",
#  "/sbin/runc",
#  "/bin/runc",
#  "/usr/lib/cri-o-runc/sbin/runc",
#]

#runsc = [
#  "/usr/bin/runsc",
#  "/usr/sbin/runsc",
#  "/usr/local/bin/runsc",
#  "/usr/local/sbin/runsc",
#  "/bin/runsc",
#  "/sbin/runsc",
#  "/run/current-system/sw/bin/runsc",
#]

#krun = [
#  "/usr/bin/krun",
#  "/usr/local/bin/krun",
#]

[engine.volume_plugins]
#testplugin = "/run/podman/plugins/test.sock"

#[machine]
# Number of CPU's a machine is created with.
#
#cpus=1

# The size of the disk in GB created when init-ing a podman-machine VM.
#
#disk_size=10

# The image used when creating a podman-machine VM.
#
#image = "testing"

# Memory in MB a machine is created with.
#
#memory=2048

# The [machine] table MUST be the last entry in this file.
# (Unless another table is added)
# TOML does not provide a way to end a table other than a further table being
# defined, so every key hereafter will be part of [machine] and not the
# main config.

~/.config/containers/containers.conf

> cat ~/.config/containers/containers.conf
cat: /home/njohnson/.config/containers/containers.conf: No such file or directory

And for what its worth:

> diff /usr/share/containers/containers.conf /etc/containers/containers.conf
558c558
< [machine]
---
> #[machine]

@nyonson
Copy link
Author

nyonson commented Oct 1, 2021

Looks like docker-compose was very recently (sept 28th) upgraded to version 2.0.0 for Arch: https://github.com/archlinux/svntogit-community/commits/packages/docker-compose/trunk

Downgrading back to version 1.29.2 fixes things for me.

pacman -U /var/cache/pacman/pkg/docker-compose-1.29.2-1-any.pkg.tar.zst

Is version 2 of docker compose not compatible?

@mheon
Copy link
Member

mheon commented Oct 1, 2021

We're still investigating compose 2.0 compatibility - safest to stick with 1.x for now. I know that building with Compose 2.0 is also broken right now.

(On the plus side, Compose 2.0 also offers some exciting opportunities to integrate with Podman more closely, so we're also investigating there)

@nyonson
Copy link
Author

nyonson commented Oct 1, 2021

Ah, got it. I think I ran into the build issue on 2.0 as well.

Is there an issue I can subscribe to in order to follow along?

@github-actions
Copy link

github-actions bot commented Nov 1, 2021

A friendly reminder that this issue had no activity for 30 days.

@github-actions
Copy link

github-actions bot commented Dec 2, 2021

A friendly reminder that this issue had no activity for 30 days.

@github-actions
Copy link

github-actions bot commented Jan 2, 2022

A friendly reminder that this issue had no activity for 30 days.

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@selurvedu
Copy link

@github-actions[bot] a friendly reminder that this issue is still relevant.

@kriansa
Copy link

kriansa commented Feb 21, 2022

@mheon is there any development on this issue?

I just tested with Podman 4.0 and compose 2.2.3 and it is still a no-go for mounting containers with VOLUME on image declaration.

Do we have any workaround at this moment?

@mheon
Copy link
Member

mheon commented Feb 22, 2022

No, largely because there's a more critical problem blocking Compose v2.0 - it requires support for the Buildkit API to be present to build images, which we presently do not have. We're going to be looking at this over the coming months to try and address it, but we don't feel like fixing minor bugs like this makes much sense until we've got core features (building images) ready and working.

@kriansa
Copy link

kriansa commented Feb 22, 2022

@mheon Thanks for the follow-up. I don't want to diverge from the original topic, but is there still an issue with building images? I remember one when Compose was just released but it seems to be fixed at this point - as far as I have tested, building images is working well at least for my use cases so far.

@mheon
Copy link
Member

mheon commented Feb 22, 2022

@kriansa Really? Interesting - if we can confirm that Buildkit is no longer required that'd be a massive relief.

@L0g4n Official answer is going to be podman generate kube and podman play kube, but we are committed to making sure that podman-compose and Docker Compose work with Podman; we just may require folks to stay on older versions for a bit when they do major rewrites that require new Docker functionality we didn't previously implement. Fortunately, there's a finite amount of Docker functionality, and every time this happens we get closer to parity.

@kriansa
Copy link

kriansa commented Feb 22, 2022

@mheon Yes. Right now I'm using podman 4.0.0 and compose 2.2.3 (latest) and I can build my images just fine using docker-compose build, but I can't tell if that's using buildkit or not (is there an easy way to check that?)

The main pain point for ditching docker completely from my computer is now the volumes issue. It can be reproduced by this docker-compose.yml:

---
volumes:
  db_data:
services:
  database:
    image: docker.io/library/mariadb:10.6.5
    volumes:
      - db_data:/var/lib/mysql

Then try to docker-compose up and it will fail with the same message as reported in the title (/var/lib/mysql: duplicate mount destination).

@shuriken1812
Copy link

shuriken1812 commented Mar 10, 2022

@kriansa exact same issue.
I want to host nakama - https://github.com/heroiclabs/nakama/blob/master/docker-compose.yml
But volumes is not supported with latest docker-compose. I hope this gets supported soon.

@mheon
Copy link
Member

mheon commented Mar 16, 2022

I can now confirm that BuildKit no longer seems to be a requirement for Compose v2.0, which unblocks the rest of this work. Beginning work on fixing this volume issue now. Seems like Compose is passing the /data mount in two separate places, for unclear reasons; deduplicating it should be sufficient to fix. Hope to get a patch out tomorrow.

mheon added a commit to mheon/libpod that referenced this issue Mar 17, 2022
Docker Compose v2.0 passes mount specifications in two different
places: Volumes (just the destination) and Mounts (full info
provided - source, destination, etc). This was causing Podman to
refuse to create containers, as the destination was used twice.
Deduplicate between Mounts and Volumes, preferring volumes, to
resolve this.

Fixes containers#11822

Signed-off-by: Matthew Heon <mheon@redhat.com>
keonchennl pushed a commit to gcalin/podman that referenced this issue Mar 18, 2022
Docker Compose v2.0 passes mount specifications in two different
places: Volumes (just the destination) and Mounts (full info
provided - source, destination, etc). This was causing Podman to
refuse to create containers, as the destination was used twice.
Deduplicate between Mounts and Volumes, preferring volumes, to
resolve this.

Fixes containers#11822

Signed-off-by: Matthew Heon <mheon@redhat.com>
keonchennl pushed a commit to gcalin/podman that referenced this issue Mar 18, 2022
Signed-off-by: Krzysztof Baran <krysbaran@gmail.com>
Signed-off-by: Calin Georgescu <caling@protonmail.com>

Improve the error message for usused configMaps

If you run `podman play kube` on a yaml file that only contains
configMaps, podman will fail with the error:

	Error: YAML document does not contain any supported kube kind

This is not strictly true; configMaps are a supported kube kind. The
problem is that configMaps aren't a standalone entity. They have to be
used in a container somewhere, otherwise they don't do anything.

This change adds a new message in the case when there only configMaps
resources. It would be helpful if podman reported which configMaps are
unused on every invocation of kube play. However, even if that feedback
were added, this new error messages still helpfully explains the reason
that podman is not creating any resources.

[NO NEW TESTS NEEDED]

Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>

Bump github.com/containernetworking/plugins from 1.0.1 to 1.1.0

Bumps [github.com/containernetworking/plugins](https://github.com/containernetworking/plugins) from 1.0.1 to 1.1.0.
- [Release notes](https://github.com/containernetworking/plugins/releases)
- [Commits](containernetworking/plugins@v1.0.1...v1.1.0)

---
updated-dependencies:
- dependency-name: github.com/containernetworking/plugins
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Show version of the deb package in info output

Previously just showing name of the package, followed by
the path repeated again (already stated on the line above)

[NO NEW TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>

copr packaging: use generic macros for tmpfiles and modules load dirs

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>

Vendor in containers/common@main

Signed-off-by: Ashley Cui <acui@redhat.com>

Allow setting binarypath from Makefile

Packagers for other distributions and package managers may put their helper binaries in other location prefixes.
Add HELPER_BINARIES_DIR to the makefile so packagers can set the prefix when building Podman.
HELPER_BINARIES_DIR will be set at link-time.

Example usage: make podman-remote HELPER_BINARIES_DIR=/my/location/prefix

Signed-off-by: Ashley Cui <acui@redhat.com>

Clarify v2 API testing for podman vs docker clients

Fixes: containers#13273

Signed-off-by: Chris Evich <cevich@redhat.com>

Add podman volume mount support

Fixes: containers#12768

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Add the names flag for pod logs

Fixes containers#13261

Signed-off-by: Xueyuan Chen <X.Chen-47@student.tudelft.nl>

Refactor docker-py compatibility tests

* Add which python client is being used to run tests, see "python
  client" below.
* Remove redundate code from test classes
* Update/Add comments to modules and classes

======================================================= test session starts ========================================================
platform linux -- Python 3.10.0, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
python client -- DockerClient
rootdir: /home/jhonce/Projects/go/src/github.com/containers/podman
plugins: requests-mock-1.8.0
collected 33 items

test/python/docker/compat/test_containers.py ...s..............  [ 54%]
test/python/docker/compat/test_images.py ............  [ 90%]
test/python/docker/compat/test_system.py ...  [100%]

Note: Follow-up PRs will verify the test results and expand the tests.

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Revert "use GetRuntimeDir() from c/common"

This reverts commit fc5cf81.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>

Use storage that better supports rootless overlayfs

overlayfs -- the kernel's version, not fuse-overlayfs -- recently learned
(as of linux 5.16.0, I believe) how to support rootless users. Previously,
rootless users had to use these storage.conf(5) settings:

* storage.driver=vfs          (aka STORAGE_DRIVER=vfs), or
* storage.driver=overlay      (aka STORAGE_DRIVER=overlay),
  storage.options.overlay.mount_program=/usr/bin/fuse-overlayfs
                              (aka STORAGE_OPTS=/usr/bin/fuse-overlayfs)

Now that a third backend is available, setting only:

* storage.driver=overlay      (aka STORAGE_DRIVER=overlay)

containers#13123 reported EXDEV errors
during the normal operation of their container. Tracing it out, the
problem turned out to be that their container was being mounted without
'userxattr'; I don't fully understand why, but mount(8) mentions this is
needed for rootless users:

> userxattr
>
>   Use the "user.overlay." xattr namespace instead of "trusted.overlay.".
>   This is useful for unprivileged mounting of overlayfs.

containers/storage#1156 found and fixed the issue
in podman, and this just pulls in that via

    go get github.com/containers/storage@ebc90ab
    go mod vendor
    make vendor

Closes containers#13123

Signed-off-by: Nick Guenther <nick.guenther@polymtl.ca>

container: workdir resolution must consider symlink if explicitly configured

While resolving `workdir` we mostly create a `workdir` when `stat`
fails with `ENOENT` or `ErrNotExist` however following cases are not
true when user explicitly specifies a `workdir` while `running` using
`--workdir` which tells `podman` to only use workdir if its exists on
the container. Following configuration is implicity set with other
`run` mechanism like `podman play kube`

Problem with explicit `--workdir` or similar implicit config in `podman play
kube` is that currently podman ignores the fact that workdir can also be
a `symlink` and actual `link` could be valid.

Hence following commit ensures that in such scenarios when a `workdir`
is not found and we cannot create a `workdir` podman must perform a
check to ensure that if `workdir` is a `symlink` and `link` is resolved
successfully and resolved link is present on the container then we
return as it is.

Docker performs a similar behviour.

Signed-off-by: Aditya R <arajan@redhat.com>

vendor: bump c/storage to main/d06b0f

Bump c/storage to main/d06b0f so we podman could use new `race-free`
`AddNames` and `RemoveNames` api

Signed-off-by: Aditya R <arajan@redhat.com>

vendor: bump c/image to main/9a9cd9

Bump c/image to upstream main/9a9cd9 so podman could use new race-free
code.

Signed-off-by: Aditya R <arajan@redhat.com>

test: add a test to verify race free concurrent/parallel builds

Invoking parallel/concurrent builds from podman race against each other
following behviour was fixed in
containers/storage#1153 and containers/image#1480

Test verifies if following bug is fixed in new race-free API or not.
Read more about this issue, see bz 2055487 for more details.

More details here: containers/buildah#3794 and containers#13339

Co-authored-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Aditya R <arajan@redhat.com>

RELEASE_PROCESS.md: build artifacts locally

The current PR process for release bump has the HEAD commit which bumps
version/version.go to the form `release+1-dev`. This makes Cirrus
publish release artifacts with `release+1-dev` and not `release`.

For example, the msi generated at https://cirrus-ci.com/task/5403901196238848
says podman-v4.0.3-dev.msi .

Building locally by checking out the released tag would generate the
correct artifacts and would also be faster and more convenient.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>

libpod: pods do not use cgroups if --cgroups=disabled

do not attempt to use cgroups with pods if the cgroups are disabled.
A similar check is already in place for containers.

Closes: containers#13411

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Throw an error if kube yaml has duplicate ctr names

Error out if the kube yaml passed to play kube has more
than one container or init container with the same name.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>

Move all python tests to pytest

* Add configuration to add report header for python client used in tests
* Move report headers into the individual test runners vs runner.sh

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Fixes: containers#13301 ("machine rm removes the mounted socket file on macos")

[NO NEW TESTS NEEDED]
Signed-off-by: Thibault Gagnaux <tgagnaux@gmail.com>

[CI:DOCS] RELEASE_PROCESS.md: cosmetic fix

Follow up to pr#13416

Insert line breaks to get rid of the horizontal scroll bar.

Resolves: containers#13416 (comment)

Co-authored-by: Ashley Cui <acui@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>

[CI:DOCS] DISTRO_PACKAGE.md: List the packaging changes for v4

[NO NEW TESTS NEEDED]

Co-authored-by: Ashley Cui <ashleycui16@gmail.com>
Co-authored-by: Valentin Rothberg <vrothberg@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>

[CI:DOCS] troubleshooting.md: Improve language and fix typos

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>

Add ExitCommandDelay configuration use in API exec handler

[NO NEW TESTS NEEDED]

Signed-off-by: Rover van der Noort <s.r.vandernoort@student.tudelft.nl>

MacOS improvements

* Enable support of virtfs in Podman and darwin.  At the time of this writing, it requires a special patch not yet included in upstream qemu.
* Prefer to use a specially built qemu to support virtfs.  The qemu is installed under libexec/podman.

[NO NEW TESTS NEEDED]
Signed-off-by: Brent Baude <bbaude@redhat.com>

Inspect network info of a joined network namespace

Closes: containers#13150
Signed-off-by: 😎 Mostafa Emami <mustafaemami@gmail.com>

Move secret-verify-leak containerfile into its own Directory

Secret-verify-leak is causing flakes, when running in parallel tests.
This is because remote secrets are copied into the context directory to
send to the API server, and secret-verify-leak is doing a COPY * and
then checking if the temporary secret file ends up in the container or
not. Since all the temporary files are prefixed with
"podman-build-secret", this test checks if podman-build-secret is in the
image. However, when run in parallel with other tests, other temporary
podman-build-secrets might be in the context dir. Moving
secret-verify-leak into its own directory makes sure that the context
dir is used only by this one test.

Also renamed Dockerfile -> Containerfile and cleaned up unused
Containerfiles.

Signed-off-by: Ashley Cui <acui@redhat.com>

Skip flaky pprof tests

pprof tests are way too flaky, and are causing problems for
community contributors who don't have privs to press Re-run.

There has been no activity or interest in fixing the bug,
and it's not something I can fix. So, just disable the test.

Signed-off-by: Ed Santiago <santiago@redhat.com>

[CI:DOCS] troubleshooting.md: mention "podman unshare chown 0:0 path"

* Mention the command "podman unshare chown 0:0 dir1/a"
  that changes file ownership to the regular user's UID and GID on
  the host.

Co-authored-by: Tom Sweeney <tsweeney@redhat.com>
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>

machine rm -f stops and removes machine

If you want to remove a running machine, you can now pass the --force/-f
to podman machine rm and the machine will be stopped and removed without
confirmations.

Fixes: containers#13448

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>

Improve agent install message to add restart instructions

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>

Bump github.com/docker/distribution

Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.8.0+incompatible to 2.8.1+incompatible.
- [Release notes](https://github.com/docker/distribution/releases)
- [Commits](distribution/distribution@v2.8.0...v2.8.1)

---
updated-dependencies:
- dependency-name: github.com/docker/distribution
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Set default rule at the head of device configuration

The default rule should be set at the head of device configuration.
Otherwise, rules for user devices are overridden by the default rule so
that any access to the user devices are denied.

Signed-off-by: Hironori Shiina <shiina.hironori@jp.fujitsu.com>

use gopkg.in/yaml.v2 instead of v3

Many dependencies already import gopkg.in/yaml.v2, podman is the only
user of the v3 version except  github.com/stretchr/testify but this is
only a testing dependency so it will not end up in the binary.

This change reduces the podman binary size from 54740 to 54260 KB on my
system.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>

Use github.com/vbauerster/mpb/v7 in pkg/machine

We already use v7 in c/image so podman should use the same version to
prevent duplication.

This saves 170 KB binary size.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>

Fix handling of tmpfs-mode for tmpfs creation in compat mode

The permissions on disk were wrong since we were not converting to
octal.

Fixes: containers#13108

[NO NEW TESTS NEEDED] Since we don't currently test using the docker
client

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Add --context-dir option to podman play kube

This option was requested so that users could specify alternate
locations to find context directories for each image build. It
requites the --build option to be set.

Partion Fix: containers#12485

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Bump github.com/vbauerster/mpb/v7 from 7.3.2 to 7.4.1

Bumps [github.com/vbauerster/mpb/v7](https://github.com/vbauerster/mpb) from 7.3.2 to 7.4.1.
- [Release notes](https://github.com/vbauerster/mpb/releases)
- [Commits](vbauerster/mpb@v7.3.2...v7.4.1)

---
updated-dependencies:
- dependency-name: github.com/vbauerster/mpb/v7
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Bump github.com/containernetworking/plugins from 1.1.0 to 1.1.1

Bumps [github.com/containernetworking/plugins](https://github.com/containernetworking/plugins) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/containernetworking/plugins/releases)
- [Commits](containernetworking/plugins@v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: github.com/containernetworking/plugins
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

CI: fix golangci-lint installation

avoid this warn:
```
golangci/golangci-lint info installed ./bin/golangci-lint
golangci/golangci-lint err this script is deprecated, please do not use it anymore. check goreleaser/godownloader#207
```

Signed-off-by: Pascal Bourdier <pascal.bourdier@gmail.com>

[CI:DOCS] Remove "(1)" from web tab text

* Remove the ending text "(1)" to avoid it from being
  displayed in the web tab title for a command man page
  on the web. Often such a text indicates that a web
  page got an update. For instance GitHub issues shows
  the number of new comments that have been written
  after the user's last visit.
  Fixes containers#13438

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>

Add podman play kube --annotation

Allow users to add annotions in the podman play kube command.
This PR Also fixes the fact that annotations in the pod spec were
not being passed down to containers.

Fixes: containers#12968

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Bump github.com/docker/docker

Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.12+incompatible to 20.10.13+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](moby/moby@v20.10.12...v20.10.13)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Bump github.com/spf13/cobra from 1.3.0 to 1.4.0

Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](spf13/cobra@v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

podman.spec.rpkg: enable rhel8 builds on copr

fix conditionals and buildtags to enable rhel8 builds

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>

Fixes TTY & resizing on Mac and Windows

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>

Bump golang to 1.17 in `vendor-in-container`

Go 1.17 compiler got faster

Signed-off-by: Pascal Bourdier <pascal.bourdier@gmail.com>

Add support for --chrootdirs

Signed-off-by: LStandman <65296484+LStandman@users.noreply.github.com>

Fix typo

[NO NEW TESTS NEEDED]

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>

slirp: fix setup on ipv6 disabled systems

When enable_ipv6=true is set for slirp4netns (default since podman v4),
we will try to set the accept sysctl. This sysctl will not exist on
systems that have ipv6 disabled. In this case we should not error and
just ignore the extra ipv6 setup.

Also the current logic to wait for the slirp4 setup was kinda broken, it
did not actually wait until the sysctl was set before starting slirp.
This should now be fixed by using two `sync.WaitGroup`s.

[NO NEW TESTS NEEDED]

Fixes containers#13388

Signed-off-by: Paul Holzinger <pholzing@redhat.com>

vendor: bump buildah, c/image and c/storage

Bumps

c/buildah to -> `v1.24.3-0.20220310160415-5ec70bf01ea5`
c/storage to -> `v1.38.3-0.20220308085612-93ce26691863`
c/image to -> `v5.20.1-0.20220310094651-0d8056ee346f`

Signed-off-by: Aditya R <arajan@redhat.com>

docs: podman-build add --no-hosts

Add newly added `--no-hosts` to build docs and document its conflicting
nature with `--add-host`

Signed-off-by: Aditya R <arajan@redhat.com>

apply-podman-deltas: skip modified test case for --add-host which adds anomaly

All podman tests in CI expects exit code 125, which might not be true since exit code from runtime
is relayed as it is without any modification both in `buildah` and `podman`. Following behviour is seen when PR containers/buildah#3809
added a test here https://github.com/containers/buildah/blob/main/tests/bud.bats#L3183 which relays exit code from runtime as it
is, in case of both `podman` and `buildah`. However apart from this test case no other test case was able to trigger this behviour hence
marking this test as an anomaly. Since its debatable if we should override this returned error number or not hence adding a note here.

Signed-off-by: Aditya R <arajan@redhat.com>

test/e2e: add aardvark specific tests

Co-authored-by: Brent Baude <bbaude@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>

Bump github.com/spf13/cobra from 1.3.0 to 1.4.0

Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](spf13/cobra@v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Bump github.com/docker/docker

Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.12+incompatible to 20.10.13+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](moby/moby@v20.10.12...v20.10.13)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

fix breaking change in pkg/bindings

pkg/bindings is considered stable. We cannot make changes that would
break any users. If someone uses this field their code would fail to
compile. Since the fix is obviously correct we will keep it but also
add the old field back in to keep compatibility with old code.

When both fields are set ImportArchive is preferred over ImportAchive.

Fixes changes from commit 2171973

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>

Fix windows win-sshproxy build

Github no longer supports the unauthenticated git protocol, so switch
to using https instead.

https://github.blog/2021-09-01-improving-git-protocol-security-github/

Signed-off-by: Paul Holzinger <pholzing@redhat.com>

fix empty newline in version output

When podman is build without git commit information it will print a
empty newline instead. This is undesirable and a regression introduced
in commit 7d22cc8.

To test build podman with `go build -mod=vendor -o bin/podman ./cmd/podman`
and check the output of bin/podman version with and without this commit.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>

move k8s deps into podman

We only need a small part of the k8s dependencies but they are the
biggest dependencies in podman by far. Moving them into podman allows us
to remove the unnecessary parts.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>

remove unneeded k8s code

There is a lot of unneeded code, k8s is the by far the biggest
dependency in podman. We should remove as much as possible so that we
only have the stuff left that we use.

This is just a quick skim over the code which removes a lot of the
generated code and many packages that are now unused.
I know that this will be impossible to properly review. I will try to
make smaller changes in follow up work.

Right now this reduces about 8 MB in binary size!!!

[NO NEW TESTS NEEDED] Hopefully existing tests will catch any problems.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>

pkg/k8s.io/...: fix lint errors

Fix linting errors. We use different/stricter linters, instead of
skipping these packages we should fix it.

Most errors are about naming conventions, since I do not want to change
the names I added the nolint comment there. I also removed some unused
fields where the linter complained.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>

pkg/k8s.io/...: remove protobuf field tags

Since we do not use protobuf we can remove these field tags. This will
save some KB in the final binary size.

This change was automated with the following commands:
find pkg/k8s.io/ -type f -name "*.go" -exec sed -i -e 's/\sprotobuf\:\".*\"//g' {} +
find pkg/k8s.io/ -type f -name "*.go" -exec sed -i -e 's/\s`protobuf\:\".*\"`//g' {} +

Signed-off-by: Paul Holzinger <pholzing@redhat.com>

pkg/k8s.io/...: remove more unneeded files

We do not use the types defined in these fields.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>

pkg/k8s.io/api/core/v1: remove unneeded types

Remove types that are not applicable for podman. This are types I do not
think we need, there is definitely more that could be removed but this
should be handled by someone who knows the k8s code better than me.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>

pkg/k8s.io: add small readme with copyright notice

Signed-off-by: Paul Holzinger <pholzing@redhat.com>

[CI:DOCS]: Mention netavark limitations for macvlan/ipvlan drivers

The example is also improved to add the --subnet option, this option is required with netavark, else you get:
    Error: macvlan driver needs at least one subnet specified, DHCP is not supported with netavark

Signed-off-by: Clayton Craft <clayton@craftyguy.net>

Exit with 0 when receiving SIGTERM

* systemctl stop podman.service will now return exit code 0
* Update test framework to support JSON boolean and numeric values

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Add test for BZ #2052697

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Separator is no longer prepended when prefix is empty on podman generate systemd

When podman generate systemd is invoked, it previously did not check if
container-prefix or pod-prefix are empty. When these are empty, the file name
starts with the separator, which is hyphen by default. This results in files
like '-containername.service'.

The code now checks if these prefixes are empty. If they are, the filename no
longer adds a separator. Instead, it uses name or ID of the container or pod.

Closes containers#13272

Signed-off-by: Nirmal Patel <npate012@gmail.com>

Set rawimage for containers created via play kube

This commit set the containers RawImageName to default image name
specified in Pod YAML, so the containers could be used via autoupdate
feature, which needs the RawImageName to be set.

Currently RawImageName is set only for the create/run/clone podman
commands.

[NO NEW TESTS NEEDED]

Signed-off-by: Ondra Machacek <omachace@redhat.com>

podman create: building local pause image: do not read ignore files

Make sure to ignore local {container,docker}ignore files when building a
local pause image.  Otherwise, we may mistakenly not be able to copy
catatonit into the build container.

Fixes: containers#13529
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>

podman machine: remove hostip from port

Inside the podman machine vm we always remove the hostip from the port
mapping because this should only be used on the actual host. Otherwise
you run into issues when we would bind 127.0.0.1 or try to bind a
host address that is not available in the VM.

This was already done for cni/netavark ports and slirp4netns but not for
the port bindings inside libpod which are only used as root.

[NO NEW TESTS NEEDED] We still do not have machine tests!

Fixes containers#13543

Signed-off-by: Paul Holzinger <pholzing@redhat.com>

go fmt: use go 1.18 conditional-build syntax

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>

Handle incompatible machines

Start in a reduced mode for recovery, warn, and provide instructions to recreate them

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>

logformatter: link to bats sources on error

We already link to ginkgo sources, now add links to bats.
Ugly, because we need to hardcode containers/podman (git
repo) and test/system (test file path): those can't be
determined from the log results like they can in ginkgo.

Also, great suggestion from @Luap99: in addition to the
'Annotated results' link which we append to the basic log,
include a short summary of failures. This should help a
viewer see exactly which test(s) failed, which in turn
can be helpful for diagnosing known-flake or real-problem.

Signed-off-by: Ed Santiago <santiago@redhat.com>

build(deps): bump github.com/stretchr/testify from 1.7.0 to 1.7.1

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Deduplicate between Volumes and Mounts in compat API

Docker Compose v2.0 passes mount specifications in two different
places: Volumes (just the destination) and Mounts (full info
provided - source, destination, etc). This was causing Podman to
refuse to create containers, as the destination was used twice.
Deduplicate between Mounts and Volumes, preferring volumes, to
resolve this.

Fixes containers#11822

Signed-off-by: Matthew Heon <mheon@redhat.com>

Add tests with Docker Compose v2

Add a pair of new Cirrus test suites using Compose v2 instead of
Compose v1 (as is currently packaged in Fedora). They work
identically, and run the same tests, as the Compose v1 tests, but
with the new v2 binary instead.

[NO NEW TESTS NEEDED] This adds an entire Cirrus suite...

Signed-off-by: Matthew Heon <mheon@redhat.com>

Set names in compose tests based on version

Compose v2 uses dashes as separators instead of hyphens. This
broke some tests that relied upon container names. Set the name
conditionally to make it safe for both.

Signed-off-by: Matthew Heon <mheon@redhat.com>
keonchennl pushed a commit to gcalin/podman that referenced this issue Mar 18, 2022
Docker Compose v2.0 passes mount specifications in two different
places: Volumes (just the destination) and Mounts (full info
provided - source, destination, etc). This was causing Podman to
refuse to create containers, as the destination was used twice.
Deduplicate between Mounts and Volumes, preferring volumes, to
resolve this.

Fixes containers#11822

Signed-off-by: Matthew Heon <mheon@redhat.com>
keonchennl pushed a commit to gcalin/podman that referenced this issue Mar 18, 2022
Docker Compose v2.0 passes mount specifications in two different
places: Volumes (just the destination) and Mounts (full info
provided - source, destination, etc). This was causing Podman to
refuse to create containers, as the destination was used twice.
Deduplicate between Mounts and Volumes, preferring volumes, to
resolve this.

Fixes containers#11822

Signed-off-by: Matthew Heon <mheon@redhat.com>
kbaran1998 pushed a commit to gcalin/podman that referenced this issue Mar 23, 2022
Docker Compose v2.0 passes mount specifications in two different
places: Volumes (just the destination) and Mounts (full info
provided - source, destination, etc). This was causing Podman to
refuse to create containers, as the destination was used twice.
Deduplicate between Mounts and Volumes, preferring volumes, to
resolve this.

Fixes containers#11822

Signed-off-by: Matthew Heon <mheon@redhat.com>
Signed-off-by: Krzysztof Baran <krysbaran@gmail.com>
kbaran1998 pushed a commit to gcalin/podman that referenced this issue Mar 24, 2022
Docker Compose v2.0 passes mount specifications in two different
places: Volumes (just the destination) and Mounts (full info
provided - source, destination, etc). This was causing Podman to
refuse to create containers, as the destination was used twice.
Deduplicate between Mounts and Volumes, preferring volumes, to
resolve this.

Fixes containers#11822

Signed-off-by: Matthew Heon <mheon@redhat.com>
Signed-off-by: Krzysztof Baran <krysbaran@gmail.com>
kbaran1998 pushed a commit to gcalin/podman that referenced this issue Mar 24, 2022
Docker Compose v2.0 passes mount specifications in two different
places: Volumes (just the destination) and Mounts (full info
provided - source, destination, etc). This was causing Podman to
refuse to create containers, as the destination was used twice.
Deduplicate between Mounts and Volumes, preferring volumes, to
resolve this.

Fixes containers#11822

Signed-off-by: Matthew Heon <mheon@redhat.com>
Signed-off-by: Krzysztof Baran <krysbaran@gmail.com>
keonchennl pushed a commit to gcalin/podman that referenced this issue Mar 24, 2022
Docker Compose v2.0 passes mount specifications in two different
places: Volumes (just the destination) and Mounts (full info
provided - source, destination, etc). This was causing Podman to
refuse to create containers, as the destination was used twice.
Deduplicate between Mounts and Volumes, preferring volumes, to
resolve this.

Fixes containers#11822

Signed-off-by: Matthew Heon <mheon@redhat.com>
keonchennl pushed a commit to gcalin/podman that referenced this issue Mar 29, 2022
Docker Compose v2.0 passes mount specifications in two different
places: Volumes (just the destination) and Mounts (full info
provided - source, destination, etc). This was causing Podman to
refuse to create containers, as the destination was used twice.
Deduplicate between Mounts and Volumes, preferring volumes, to
resolve this.

Fixes containers#11822

Signed-off-by: Matthew Heon <mheon@redhat.com>
@katywings
Copy link

Sadly 🙈 I still get this error with podman 4.1.0 and docker-compose 2.5.0 on macOS Catalina 10.15.7 with this simple docker-compose.yaml: https://github.com/nocodb/nocodb/blob/master/docker-compose/pg/docker-compose.yml

Exporting DOCKER_BUILDKIT=0 in ~/.bashrc or calling docker-compose like: DOCKER_BUILDKIT=0 docker-compose up doesnt help.

Screenshot 2022-05-07 at 20 25 10

@mheon
Copy link
Member

mheon commented May 7, 2022

I'll take a look on Monday.

@mheon
Copy link
Member

mheon commented May 7, 2022

Also, can you open a fresh issue on this? Entire issue template would be useful to help debug.

@katywings
Copy link

katywings commented May 7, 2022

@mheon Thanks for the quick response! I actually was setting up the fresh issue when I noticed the following:

Running podman info --debug showed me, that I am actually still on 4.0.3, even though that podman -v shows: podman version 4.1.0 😱

As far as I can can tell, podman machine just doesn't yet have a fedora-coreos image with podman 4.1 😅.
I will wait a couple days or so until fedora-coreos is shipping with podman 4.1, then I will try again 😉.

P.S. About that podman -v output: I created a feature request to include the server version #14149

gbraad pushed a commit to gbraad-redhat/podman that referenced this issue Jul 13, 2022
Docker Compose v2.0 passes mount specifications in two different
places: Volumes (just the destination) and Mounts (full info
provided - source, destination, etc). This was causing Podman to
refuse to create containers, as the destination was used twice.
Deduplicate between Mounts and Volumes, preferring volumes, to
resolve this.

Fixes containers#11822

Signed-off-by: Matthew Heon <mheon@redhat.com>
@Schnuecks
Copy link

Error still exists with podman 4.1.1 and docker compose version 2.7.0

this occoured if i try to install mailcow-dockerized

@mheon
Copy link
Member

mheon commented Jul 31, 2022

Please open a fresh issue and fill out the full issue template, this should already be fixed.

@giuliohome
Copy link

Very similar case (Error response from daemon: fill out specgen: /data: duplicate mount destination) on linux fedora (where docker is podman) for Redis (docker.io/redis/redis-stack-server:latest).

Solved by upgrading to Docker Compose version v2.15.1.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Aug 29, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.