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

podman-docker doesn't support --config #14767

Closed
coiby opened this issue Jun 29, 2022 · 8 comments · Fixed by #15658
Closed

podman-docker doesn't support --config #14767

coiby opened this issue Jun 29, 2022 · 8 comments · Fixed by #15658
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

@coiby
Copy link

coiby commented Jun 29, 2022

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

/kind bug

Description

podman doesn't support --config. One consequence is Github Action could fail because when using a podman-docker on a self-hosted runner.

Steps to reproduce the issue:

  1. Install podman-docker (podman version 4.1.1)

  2. docker --config

Describe the results you received:

$ docker --config test
Error: unknown flag: --config
See 'podman --help'

Describe the results you expected:
pod

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

Output of podman version:

podman version 4.1.1

Output of podman info --debug:

WARN[0000] The cgroupv2 manager is set to systemd but there is no systemd user session available 
WARN[0000] For using systemd, you may need to login using an user session 
WARN[0000] Alternatively, you can enable lingering with: `loginctl enable-linger 1001` (possibly as root) 
WARN[0000] Falling back to --cgroup-manager=cgroupfs    
host:
  arch: amd64
  buildahVersion: 1.26.1
  cgroupControllers:
  - memory
  - pids
  cgroupManager: cgroupfs
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.0-2.fc36.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.0, commit: '
  cpuUtilization:
    idlePercent: 99.27
    systemPercent: 0.23
    userPercent: 0.5
  cpus: 1
  distribution:
    distribution: fedora
    version: "36"
  eventLogger: journald
  hostname: ci-vm-10-0-137-206.hosted.upshift.rdu2.redhat.com
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1001
      size: 1
    - container_id: 1
      host_id: 165536
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1001
      size: 1
    - container_id: 1
      host_id: 165536
      size: 65536
  kernel: 5.17.13-300.fc36.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 159924224
  memTotal: 2064752640
  networkBackend: netavark
  ociRuntime:
    name: crun
    package: crun-1.4.5-1.fc36.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.4.5
      commit: c381048530aa750495cf502ddb7181f2ded5b400
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/user/1001/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.2.0-0.2.beta.0.fc36.x86_64
    version: |-
      slirp4netns version 1.2.0-beta.0
      commit: 477db14a24ff1a3de3a705e51ca2c4c1fe3dda64
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.3
  swapFree: 2049175552
  swapTotal: 2064642048
  uptime: 24h 35m 46.48s (Approximately 1.00 days)
plugins:
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /home/test/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/test/.local/share/containers/storage
  graphRootAllocated: 21046689792
  graphRootUsed: 8748195840
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 5
  runRoot: /run/user/1001/containers
  volumePath: /home/test/.local/share/containers/storage/volumes
version:
  APIVersion: 4.1.1
  Built: 1655303518
  BuiltTime: Wed Jun 15 10:31:58 2022
  GitCommit: ""
  GoVersion: go1.18.3
  Os: linux
  OsArch: linux/amd64
  Version: 4.1.1

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

podman-4.1.1-1.fc36.x86_64

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)

No

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 Jun 29, 2022
@vrothberg
Copy link
Member

vrothberg commented Jun 29, 2022

Thanks for reaching out, @coiby!

@containers/podman-maintainers WDYT? Supporting the flag would imply translating the dockerd config to something Podman can understand (containers.conf etc.).

@Luap99
Copy link
Member

Luap99 commented Jun 29, 2022

I think the --config flag is for the client config but you linked the server config, this should be the correct one: https://docs.docker.com/engine/reference/commandline/cli/#sample-configuration-file

@vrothberg
Copy link
Member

Thanks for correcting, @Luap99. I agree, it should be the client config not the daemon one.

@rhatdan
Copy link
Member

rhatdan commented Jun 29, 2022

I think it would be difficult to support some of the flags. I guess we could add limited support perhaps specific to the requirements of a github action.

@coiby Do you know specifically what the github action is looking for? If we just added the flag and ignored it, would that still work in most cases?

@coiby
Copy link
Author

coiby commented Jun 30, 2022

@rhatdan According to https://github.com/coiby/kexec-tools/runs/7105084564?check_suite_focus=true, Github Action specify --config when logging into ghcr.io and then pulling image,

Checking docker version
Clean up resources from previous jobs
Create local container network
Starting job container
  /usr/bin/docker --config /home/test/actions-runner/_work/_temp/.docker_696612a3-8386-4209-b1f6-e04558b8d04f login ghcr.io -u coiby --password-stdin
  /usr/bin/docker --config /home/test/actions-runner/_work/_temp/.docker_696612a3-8386-4209-b1f6-e04558b8d04f pull ghcr.io/coiby/fedora:35
  Trying to pull ghcr.io/coiby/fedora:35...

Note one weird thing is /home/test/actions-runner/_work/_temp/.docker_696612a3-8386-4209-b1f6-e04558b8d04f is empty.

If I simply ignore --config in /usr/bin/docker,

#!/usr/bin/sh
[ -e /etc/containers/nodocker ] || \
echo "Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg." >&2
if [[ "$1" == --config ]]; then
        shift 2
fi

exec /usr/bin/podman "$@"

Github Action could continue.

@github-actions
Copy link

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

@rhatdan
Copy link
Member

rhatdan commented Jul 31, 2022

I have no idea how Podman could use that config file. Bottom line the simplest thing to do is add the option and then ignore it.

@github-actions
Copy link

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

rhatdan added a commit to rhatdan/podman that referenced this issue Sep 8, 2022
@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 Sep 16, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 16, 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.

4 participants