bitnami spark docker 在 minideb 上安装包

bitnami spark docker install packages on the minideb

如何在 bitnami spark 中安装附加包 docker image :latest, 带有 minideb 版本,

我也无法执行 sudo su -

I have no name!@83b7ecb6a567:/opt/bitnami/spark$ apt install iproute2
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
I have no name!@83b7ecb6a567:/opt/bitnami/spark$ uname -a
Linux 83b7ecb6a567 3.10.0-1062.9.1.el7.x86_64 #1 SMP Fri Dec 6 15:49:49 UTC 2019 x86_64 GNU/Linux
I have no name!@83b7ecb6a567:/opt/bitnami/spark$ apt-get install net-tools
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
I have no name!@83b7ecb6a567:/opt/bitnami/spark$

更改撰写文件并执行 docker-撰写

    image: bitnami/spark:2
    user: root

k# apt-get update
Reading package lists... Done

# apt-get install net-tools
Reading package lists... Done

change non root user to root