# 使用 Homebrew, apk, dnf, pacman, zypper, apt, winget 安装 apptainer

查看 apptainer 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:apptainer
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install apptainer
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add apptainer
```

  证据: Alpine Linux edge package indexes: apptainer from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install apptainer
```

  证据: Fedora Rawhide package metadata: apptainer from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- pacman (92%):

```sh
sudo pacman -S apptainer
```

  证据: Arch Linux sync databases: apptainer from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install apptainer
```

  证据: openSUSE Tumbleweed package metadata: apptainer from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

- Debian apt (92%):

```sh
sudo apt install singularity
```

  证据: Debian stable package indexes: singularity from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

### Windows

- winget (92%):

```sh
winget install --id EvilMrHenrySoftware.EndgameSingularity -e
```

  证据: Windows Package Manager source index: EvilMrHenrySoftware.EndgameSingularity from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:apptainer
- **软件包管理器:** Homebrew
- **版本:** 1.5.3
- **来源摘要:** Application container and unprivileged sandbox platform for Linux
- **主页:** <https://apptainer.org/>
- **仓库:** <https://github.com/apptainer/apptainer>
- **最后更新:** 2026-07-21T20:35:17Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- apptainer (别名)
- run-singularity (别名)
- singularity (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.5.3
## 项目历史与用法

Apptainer is an open-source Linux container platform focused on high-performance computing, reproducibility, security, and unprivileged execution. It is the Linux Foundation continuation and rename of the community Singularity project.

### 项目历史

The user guide says Apptainer was first developed at Lawrence Berkeley National Laboratory to run complex applications on HPC clusters in a simple, portable, and reproducible way. It became popular at HPC and academic sites before expanding into industry.

In November 2021, the project announced that Singularity was moving into the Linux Foundation and being renamed Apptainer to avoid confusion with other Singularity-named products and to keep the project under community governance. The announcement says the first Apptainer release would be 1.0 in a new GitHub repository.

The Apptainer changelog records v1.0.0 in March 2022. That release changed the primary executable from `singularity` to `apptainer`, renamed `/etc/singularity` to `/etc/apptainer`, migrated per-user configuration from `~/.singularity` to `~/.apptainer`, and retained a `singularity` command symlink for compatibility.

The v1.1.0 release in September 2022 made a major packaging and security shift: Apptainer no longer installed a setuid-root component by default, relying instead on unprivileged user namespaces for most operations and moving the setuid portion into optional packaging.

### 采用历史

Apptainer's adoption is strongest in HPC because it maps container workflows onto shared clusters where Docker's daemon model, root privileges, and isolation defaults are often a poor fit. Its docs emphasize single-file SIF images, integration with GPUs and high-speed filesystems, and preserving the user's host identity by default.

The compatibility strategy helped adoption after the rename. Official docs describe SIF image compatibility, support for `SINGULARITY_` environment variables during transition, a `singularity` symlink to the same binary, and automatic user configuration migration.

Distribution packaging matters because Apptainer is used on managed systems: clusters often install it centrally, admins control global configuration under `/etc/apptainer` or `/usr/local/etc/apptainer`, and users keep remotes, keys, caches, and registry credentials under `~/.apptainer`.

### 使用方式

Users build, pull, run, shell into, and exec containers with the `apptainer` CLI. Typical sources include SIF files, Docker/OCI registries, ORAS endpoints, and definition files used to build reproducible scientific or commercial software environments.

Administrators tune `apptainer.conf` for setuid behavior, namespaces, bind mounts, networking, GPUs, cgroups, and helper binary paths. Remote endpoints and keyserver settings are managed through `remote.yaml`; login commands store endpoint credentials, and OCI registry credentials can live in `~/.apptainer/docker-config.json` or a custom `--authfile`.

### 为什么软件包爱好者会关心

Apptainer is a packaging story about containers for places where containers are infrastructure, not just developer convenience. It packages runtime policy, SIF image handling, OCI interop, user namespace tradeoffs, cluster admin controls, and backwards compatibility with a large Singularity install base.

For package nerds, the rename is especially interesting because the package intentionally ships compatibility: old command names, old environment variable prefixes, image-format stability, and migration from old user config directories. That reduced the blast radius of a governance and trademark-driven project transition.

### 时间线

- 2017: User docs copyright history reflects the Sylabs/Singularity era.
- 2021: Community announcement says Singularity moved to the Linux Foundation and was renamed Apptainer.
- 2022: Changelog records Apptainer v1.0.0.
- 2022: Changelog records v1.1.0 changing the default away from setuid-root installation.
- 2024: Changelog records v1.3.x releases with OCI, packaging, and filesystem fixes.
- 2026: Main user/admin docs continue under the Apptainer project.

### Related projects

- Singularity is the original project lineage and compatibility target.
- SingularityCE/Sylabs Singularity is the related fork/product line discussed in the rename announcement.
- SIF is the container image format shared across Apptainer and Singularity workflows.
- OCI/Docker registries and ORAS endpoints are supported container sources and publication targets.

### 来源

- <https://apptainer.org/docs/admin/main/configfiles.html>
- <https://apptainer.org/docs/user/main/cli/apptainer_remote_login.html>
- <https://apptainer.org/docs/user/main/introduction.html>
- <https://apptainer.org/docs/user/main/singularity_compatibility.html>
- <https://apptainer.org/news/community-announcement-20211130/>
- <https://github.com/apptainer/apptainer/blob/main/CHANGELOG.md>


## 安全说明

infrastructure mutation or orchestration signal.

- **Geiger 风险:** orange / 中
- infrastructure mutation or orchestration signal


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Linux: /usr/local/etc/apptainer/apptainer.conf, /etc/apptainer/apptainer.conf, /usr/local/etc/apptainer/remote.yaml, /etc/apptainer/remote.yaml

## Credential files

- Unix: ~/.apptainer/remote.yaml, ~/.apptainer/docker-config.json
## 其他软件包管理器记录

- apk - apptainer - 1.5.2-r1: normalized package name match | Alpine Linux edge package indexes: apptainer from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Application containers for Linux | https://apptainer.org/
- apk - apptainer-bash-completion - 1.5.2-r1: normalized package name match | Alpine Linux edge package indexes: apptainer-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for apptainer | https://apptainer.org/
- apk - apptainer-doc - 1.5.2-r1: normalized package name match | Alpine Linux edge package indexes: apptainer-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Application containers for Linux (documentation) | https://apptainer.org/
- apk - apptainer-suid - 1.5.2-r1: normalized package name match | Alpine Linux edge package indexes: apptainer-suid from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Application containers for Linux (SUID helper binary) | https://apptainer.org/
- dnf - apptainer - 1.5.3-3.fc45: normalized package name match | Fedora Rawhide package metadata: apptainer from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Application and environment virtualization formerly known as Singularity | https://apptainer.org
- dnf - apptainer-suid - 1.5.3-3.fc45: normalized package name match | Fedora Rawhide package metadata: apptainer-suid from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Setuid component of Apptainer | https://apptainer.org
- pacman - apptainer - 1.5.3-2: normalized package name match | Arch Linux sync databases: apptainer from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Application containers for secure high performance computing | https://apptainer.org/
- zypper - apptainer - 1.5.3-1.2: normalized package name match | openSUSE Tumbleweed package metadata: apptainer from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Application and environment virtualization | https://apptainer.org
- zypper - apptainer-leap - 1.5.3-1.2: normalized package name match | openSUSE Tumbleweed package metadata: apptainer-leap from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Apptainer Definition File Templates for current openSUSE Leap | https://apptainer.org
- Debian apt - singularity - 1.0.0+git20241231-3: installed executable or alias match | Debian stable package indexes: singularity from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | game where one becomes the singularity | https://singularity.github.io/
- Ubuntu apt - singularity - 1.0.0-1: installed executable or alias match | Ubuntu 24.04 LTS package indexes: singularity from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | game where one becomes the singularity | https://singularity.github.io/
- apk - singularity - 4.5.0-r1: installed executable or alias match | Alpine Linux edge package indexes: singularity from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Application containers focused on reproducibility for scientific computing and HPC world. | https://www.sylabs.io/singularity/
- apk - singularity-bash-completion - 4.5.0-r1: installed executable or alias match | Alpine Linux edge package indexes: singularity-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for singularity | https://www.sylabs.io/singularity/
- apk - singularity-doc - 4.5.0-r1: installed executable or alias match | Alpine Linux edge package indexes: singularity-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Application containers focused on reproducibility for scientific computing and HPC world. (documentation) | https://www.sylabs.io/singularity/
- pacman - singularity - 1.1-3: installed executable or alias match | Arch Linux sync databases: singularity from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Endgame: Singularity - simulation of true AI | http://emhsoft.com/singularity/index.html
- winget - EvilMrHenrySoftware.EndgameSingularity: installed executable or alias match | Windows Package Manager source index: EvilMrHenrySoftware.EndgameSingularity from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/apptainer.yml](https://github.com/mxcl/pkgdb/blob/main/combined/apptainer.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
