Podman #
$ conda install podman
$ podman pull [イメージ名]
$ podman images
$ podman run -p [ホスト側]:[コンテナ側] -it [イメージ名]
-iはインタラクティブ、-tはtty
$ podman ps -a
$ podman rm -l
-lは–latest
$ podman attach -l
CTRL+P,CTRL+Q
でデタッチ
$ podman commit [名前] [新しい名前]
$ podman rmi [イメージ名]
VS codeのRemote-SSHでエラーする場合の対策 #
podman runのオプションで 以下のセキュリティ設定をつける
--security-opt seccomp=unconfined
sudo docker run -it --security-opt seccomp=unconfined ubuntu:22.04 /bin/bash -c "apt update; apt install -y curl; curl www.google.com
SSHログインできるイメージの作成 #
https://docs.docker.jp/engine/examples/running_ssh_service.html
https://hub.docker.com/r/linuxserver/openssh-server
VSCode remote container #
F1押して
Remote-Containers: Open Folder in Container
ビルド #
podman build -t [イメージ名] .