有没有办法在 Docker 文件中包含 .deb 包

Is there a way i can include .deb package in Docker file

我创建了一个 xyz.deb 包,安装后它提供了一个应用程序。我正在尝试使用 FROM Ubuntu 20.04.

创建 docker 容器

我如何在 Dockerfile 中添加我的 xyz.deb 包并安装它,以便容器与应用程序 xyz 一起准备就绪。

提前致谢 拉胡尔

COPY command in a Dockerfile lets you copy external files into the container. You can then install the .deb file as you would on your local system with a RUN 命令。

简单示例:

COPY ./xyz.deb /
RUN dpkg -i /xyz.deb