名前空間内にproc filestsremをマウントする

名前空間内にproc filestsremをマウントする

Linuxオペレーティングシステム(ubuntuやcentosなど)用のrootfsがあり、 mountそこにあるコマンドを削除しました。

今、またはコンテナ内の他のコマンドを使用してnsenterprocファイルシステムをマウントする方法はありますか?unshare

次の簡単なコマンドを使用してコンテナを作成します。

# Create Container
unshare --fork --pid --mount-proc chroot rootfs /bin/bash 

# Get pid of namespace
pgrep -P $(pgrep unshare)    

これで、コンテナ内にprocファイルシステムをマウントしようとしましたが、コンテナにmountコマンドがありません。
どうすればいいですか?

ベストアンサー1

おすすめ記事