如何在 Ubuntu Docker 镜像上安装 /etc/services
当你使用基于 Ubuntu 的 docker 镜像如
Dockerfile
FROM ubuntu:22.04默认情况下,/etc/services 未安装。
但是,你可以通过安装 netbase apt 包来轻松安装它:
Dockerfile
# netbase provides /etc/services
RUN apt update && apt install -y netbase && rm -rf /var/lib/apt/lists/*If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow