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

No podman.sock when using alpine linux #23422

Closed
docentYT opened this issue Jul 28, 2024 · 6 comments
Closed

No podman.sock when using alpine linux #23422

docentYT opened this issue Jul 28, 2024 · 6 comments
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

@docentYT
Copy link

Issue Description

Socket podman.sock does not exist in alpine linux.

Steps to reproduce the issue

  1. Install podman on alpine linux.

Describe the results you received

# find / -name podman.sock

does not return anything.

Describe the results you expected

A socket should exist somewhere, as it does on debian, for example: /run/podman/podman.sock

podman info output

host:
  arch: amd64
  buildahVersion: 1.35.4
  cgroupControllers:
  - cpuset
  - cpu
  - io
  - memory
  - hugetlb
  - pids
  cgroupManager: cgroupfs
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.12-r0
    path: /usr/bin/conmon
    version: 'conmon version 2.1.12, commit: unknown'
  cpuUtilization:
    idlePercent: 99.7
    systemPercent: 0.19
    userPercent: 0.11
  cpus: 2
  databaseBackend: sqlite
  distribution:
    distribution: alpine
    version: 3.20.2
  eventLogger: file
  freeLocks: 2048
  hostname: podman.local
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 6.6.42-0-lts
  linkmode: dynamic
  logDriver: k8s-file
  memFree: 1843785728
  memTotal: 2071240704
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.10.0-r0
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.10.0
    package: netavark-1.10.3-r0
    path: /usr/libexec/podman/netavark
    version: netavark 1.10.3
  ociRuntime:
    name: crun
    package: crun-1.15-r0
    path: /usr/bin/crun
    version: |-
      crun version 1.15
      commit: e6eacaf4034e84185fd8780ac9262bbf57082278
      rundir: /run/crun
      spec: 1.0.0
      +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-2024.06.07-r0
    version: |
      pasta unknown version
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: false
    path: /run/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: false
    seccompEnabled: true
    seccompProfilePath: /etc/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 4141871104
  swapTotal: 4141871104
  uptime: 0h 27m 14.00s
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 62930079744
  graphRootUsed: 236658688
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Supports shifting: "true"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 1
  runRoot: /run/containers/storage
  transientStore: false
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 5.0.3
  Built: 1720373660
  BuiltTime: Sun Jul  7 19:34:20 2024
  GitCommit: ""
  GoVersion: go1.22.5
  Os: linux
  OsArch: linux/amd64
  Version: 5.0.3

Podman in a container

No

Privileged Or Rootless

Privileged

Upstream Latest Release

Yes

Additional environment details

Proxmox: pve-manager/8.2.2/9355359cd7afbae4 (running kernel: 6.8.4-2-pve)
Alpine on VM.

Additional information

No response

@docentYT docentYT added the kind/bug Categorizes issue or PR as related to a bug. label Jul 28, 2024
@Luap99
Copy link
Member

Luap99 commented Jul 29, 2024

you need to run the podman service in order to get the API socket podman system service

On systemd distros you can enable the podman.socket unit as we support socket activation (which is what debian seems to be doing by default)

@Luap99 Luap99 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 29, 2024
@docentYT
Copy link
Author

Running podman system service does not solve the problem.

Alpine linux is not systemd based.

@afbjorklund
Copy link
Contributor

afbjorklund commented Jul 29, 2024

Use OpenRC instead: service podman start

See https://wiki.alpinelinux.org/wiki/Podman

@docentYT
Copy link
Author

service podman start resolved the issue.

# service podman start
 * Configured as rootful service
 * /run/podman: correcting mode
 * Starting Podman API service ...                                                                                [ ok ]
 * Starting containers with restart policy set to always ...                                                      [ ok ]
 
# find / -name podman.sock
/run/podman/podman.sock

I don't see any mention of running this service on the alpine linux wiki or in the podman installation manual.

@afbjorklund
Copy link
Contributor

afbjorklund commented Jul 29, 2024

No, it seems to be missing. It was on the Docker page, though. https://wiki.alpinelinux.org/wiki/Docker

Maybe their wiki could be improved? It is possible it only has: https://wiki.alpinelinux.org/wiki/OpenRC

Note that you don't need the podman.sock to run it locally.

You only need the socket, to use the API or access remotely.

@afbjorklund
Copy link
Contributor

The configuration for /etc/init.d/podman is in /etc/conf.d/podman, by the way. There you can enable rootless.

# See podman-system-service(1) for service description
# and available options.
#podman_opts="--time 0"

# API endpoint in URI form. Leave empty to use defaults.
#podman_uri=""

# Setting root user will start rootful service.
# Use any other user for rootless mode.
#podman_user="root"

@stale-locking-app stale-locking-app bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Oct 28, 2024
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Oct 28, 2024
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

No branches or pull requests

3 participants