注意:这是https://hub.docker.com/_/bash%E7%9A%84%60arm64v8%60%E6%9E%B6%E6%9E%84%E6%9E%84%E5%BB%BA%E7%9A%84%E2%80%9C%E6%AF%8F%E6%9E%B6%E6%9E%84%E2%80%9D%E4%BB%93%E5%BA%93%E2%80%94%E2%80%94%E6%9B%B4%E5%A4%9A%E4%BF%A1%E6%81%AF%EF%BC%8C%E8%AF%B7%E5%8F%82%E8%A7%81%E5%AE%98%E6%96%B9%E9%95%9C%E5%83%8F%E6%96%87%E6%A1%A3%E4%B8%AD%E7%9A%84%E2%80%9Chttps://github.com/docker-library/official-images#architectures-other-than-amd64%E2%80%9D%E5%92%8C%E5%AE%98%E6%96%B9%E9%95%9C%E5%83%8FFAQ%E4%B8%AD%E7%9A%84%E2%80%9Chttps://github.com/docker-library/faq#an-images-source-changed-in-git-now-what%E2%80%9D%E3%80%82
维护者:
https://github.com/tianon/docker-bash%EF%BC%8Chttps://github.com/docker-library/official-images/pull/2217#issue-***
获取帮助的途径:
Docker社区Slack、Server Fault、Unix & Linux或Stack Overflow
Dockerfile链接https://github.com/tianon/docker-bash/blob/33dd5c2ee28bf8f5a2429d538e2dbb3a00cd52a5/devel/Dockerfile
https://github.com/tianon/docker-bash/blob/3b56c1c4a4e381f8b53decf0917fddd2cd15c8d4/5.3/Dockerfile
https://github.com/tianon/docker-bash/blob/9fc164bd1a8e4bfe16c517623ce935dc821bbb08/5.2/Dockerfile
https://github.com/tianon/docker-bash/blob/8ba8423bc0d3339722d4ba2d1af1f53fd179f506/5.1/Dockerfile
https://github.com/tianon/docker-bash/blob/5f58d08f8ee4a558b8302ef22352af99d4beedfd/5.0/Dockerfile
https://github.com/tianon/docker-bash/blob/099d6114cbdb9b016fb8c4beb653187df002f66f/4.4/Dockerfile
https://github.com/tianon/docker-bash/blob/099d6114cbdb9b016fb8c4beb653187df002f66f/4.3/Dockerfile
https://github.com/tianon/docker-bash/blob/8556e37dc74a044cfd6e8255acfd116a5bdb8588/4.2/Dockerfile
https://github.com/tianon/docker-bash/blob/099d6114cbdb9b016fb8c4beb653187df002f66f/4.1/Dockerfile
https://github.com/tianon/docker-bash/blob/099d6114cbdb9b016fb8c4beb653187df002f66f/4.0/Dockerfile
https://github.com/tianon/docker-bash/blob/099d6114cbdb9b016fb8c4beb653187df002f66f/3.2/Dockerfile
https://github.com/tianon/docker-bash/blob/099d6114cbdb9b016fb8c4beb653187df002f66f/3.1/Dockerfile
https://github.com/tianon/docker-bash/blob/5ffa8349006e790fe3534d0a6c3100fd6d725407/3.0/Dockerfile
提交issue的位置:
https://github.com/tianon/docker-bash/issues?q=
支持的架构:(https://github.com/docker-library/official-images#architectures-other-than-amd64)
https://hub.docker.com/r/amd64/bash/, https://hub.docker.com/r/arm32v6/bash/, https://hub.docker.com/r/arm32v7/bash/, https://hub.docker.com/r/arm64v8/bash/, https://hub.docker.com/r/i386/bash/, https://hub.docker.com/r/ppc64le/bash/, https://hub.docker.com/r/riscv64/bash/, https://hub.docker.com/r/s390x/bash/
已发布镜像工件详情:
https://github.com/docker-library/repo-info/blob/master/repos/bash%EF%BC%88https://github.com/docker-library/repo-info/commits/master/repos/bash%EF%BC%89
(镜像元数据、传输大小等)
镜像更新:
https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Fbash
https://github.com/docker-library/official-images/blob/master/library/bash%EF%BC%88https://github.com/docker-library/official-images/commits/master/library/bash%EF%BC%89
本描述的来源:
https://github.com/docker-library/docs/tree/master/bash%EF%BC%88https://github.com/docker-library/docs/commits/master/bash%EF%BC%89
Bash是GNU项目的Bourne Again SHell,是IEEE POSIX和开放组shell规范的完整实现,具有交互式命令行编辑、在支持的架构上提供作业控制、类似csh的特性(如历史替换和大括号扩展)以及许多其他功能。
tiswww.case.edu/php/chet/bash/bashtop.html
!https://raw.githubusercontent.com/docker-library/docs/5cb6fef6ed317e5af7e1e14e64c18c2b81657e81/bash/logo.png
此镜像的主要使用场景是在你的主发行版更新软件包之前测试较新版本Bash的新特性,以及针对不同Bash版本测试shell脚本以确保兼容性。可能还有其他有趣的使用场景,但这是该镜像最初创建要解决的两个主要场景!
关于此镜像,有几个重要的注意事项:
Bash本身安装在/usr/local/bin/bash,而非/bin/bash,因此推荐的shebang是#!/usr/bin/env bash,而非#!/bin/bash(或者显式通过bash /.../script.sh运行脚本,而不是让shebang自动调用Bash)。该镜像不包含/bin/bash,但如果通过镜像中包含的包管理器安装Bash,该包将安装到/bin/bash,可能会引起混淆(尽管/usr/local/bin在$PATH中位于/bin之前,因此只要一致使用bash或/usr/bin/env,镜像提供的Bash将优先被使用)。
仅包含Bash,因此如果你的脚本依赖外部工具(例如jq),需要手动添加(例如通过apk add --no-cache jq)。
console$ docker run -it --rm arm64v8/bash:4.4 bash-4.4# which bash /usr/local/bin/bash bash-4.4# echo $BASH_VERSION 4.4.0(1)-release
console$ docker run -it --rm -v /path/to/script.sh:/script.sh:ro arm64v8/bash:4.4 bash /script.sh ... $ docker run -it --rm -v /path/to/script.sh:/script.sh:ro arm64v8/bash:3.2 bash /script.sh ...
dockerfileFROM arm64v8/bash:4.4 COPY script.sh / CMD ["bash", "/script.sh"]
然后,构建并运行Docker镜像:
console$ docker build -t my-bash-app . ... $ docker run -it --rm --name my-running-app my-bash-app ...
Bash是自由软件,根据GNU通用公共许可证第3版分发。
与所有Docker镜像一样,这些镜像可能还包含其他软件,这些软件可能采用其他许可证(例如基础发行版中的Bash等,以及包含的主要软件的任何直接或间接依赖项)。
一些能够自动检测到的附加许可证信息可能位于https://github.com/docker-library/repo-info/tree/master/repos/bash%E4%B8%AD%E3%80%82
对于任何预构建镜像的使用,镜像用户有责任确保对该镜像的任何使用都符合其中包含的所有软件的相关许可证。
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务