Podman: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
  yum -y install podman
  . /etc/os-release
 
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d /devel:kubic:libcontainers:stable.list
 
curl -L "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key" | sudo apt-key add -
 
apt update
apt upgrade
apt install podman
 
==Add Registries==
{|
|valign="top" colspan="2"|
<source lang="bash">
podman login hub.chorke.org -u academia -p sadaqah!
 
sudo tee -a /etc/containers/registries.conf >>/dev/null <<'EOF'
 
[registries.search]
registries = ['hub.chorke.org', 'hub.docker.com', 'docker.io', 'quay.io', 'ghcr.io']
EOF
</source>
|-
|valign="top" colspan="2"|
----
|-
|valign="top" colspan="2"|
podman pull chorke/crawler:1.0.00
|-
|valign="top" colspan="2"|
----
|-
|valign="top"|
? Please select an image:
  ▸ hub.chorke.org/chorke/crawler:1.0.00
    hub.docker.com/chorke/crawler:1.0.00
    docker.io/chorke/crawler:1.0.00
    quay.io/chorke/crawler:1.0.00
    ghcr.io/chorke/crawler:1.0.00
|valign="top"|
✔ hub.chorke.org/chorke/crawler:1.0.00
Trying to pull hub.chorke.org/chorke/crawler:1.0.00...
Getting image source signatures
Copying blob f910a506b6cb done 
Copying blob dff385d19640 [=======>------------------------------] 21.9MiB / 101.3MiB
Copying blob e7c96db7181b done 
Copying blob c2274a1a0e27 [=========>----------------------------] 17.9MiB / 67.5MiB
 
|}


==Manage Images==
==Manage Images==
Line 11: Line 60:
  podman pull fedora:latest
  podman pull fedora:latest


==Knowledge==  
==Knowledge==
{|
|valign='top'|
  podman logs –latest
  podman logs –latest
  podman inspect –l
  podman inspect –l
podman --version
podman version
podman --help
  podman ps
  podman ps
|valign='top'|
podman login  hub.chorke.org -u academia -p sadaqah!
podman login  reg.chorke.org -u academia -p sadaqah!
podman logout hub.chorke.org
podman logout reg.chorke.org
|valign='top'|
|-
|colspan='3'|
----
|-
|valign='top'|
podman run --name='crawler' -d -p 1983:1983 chorke/crawler:1.0.00
podman run --rm --name='crawler' -d -p 1983:1983 chorke/crawler:1.0.00
podman run --rm --name='crawler' -d -p 1983:1983 hub.chorke.org/chorke/crawler:1.0.00
|valign='top'|
ls -lah $HOME/.local/share/containers/storage
rm -rf  $HOME/.local/share/containers/cache/*
du -sh  $HOME/.local/share/containers
|valign='top'|
|}


==References==
==References==
{|
{|
| valign="top" |
| valign="top" |
* [https://developers.redhat.com/blog/2019/02/21/podman-and-buildah-for-docker-users Podman and Buildah for Docker users]
* [https://developers.redhat.com/blog/2020/11/19/transitioning-from-docker-to-podman Transitioning from Docker to Podman]
* [https://www.redhat.com/sysadmin/podman-windows-wsl2 Podman on Windows with WSL2]
* [https://www.redhat.com/sysadmin/podman-windows-wsl2 Podman on Windows with WSL2]
* [https://codefresh.io/devops/docker-images-without-docker-practical-guide/ Docker Images Without Docker]
* [https://codefresh.io/devops/docker-images-without-docker-practical-guide/ Docker Images Without Docker]
* [https://podman.io/getting-started/installation Podman Installation]
* [https://medium.com/technopanti/docker-vs-podman-c03359fabf77 Docker vs Podman]
* [https://medium.com/technopanti/docker-vs-podman-c03359fabf77 Docker vs Podman]
* [https://podman.io/getting-started/installation Podman Installation]
* [[Linux Containers]]
* [https://podman.io/ Podman]
* [https://podman.io/ Podman]
* [https://buildah.io/ Buildah]
* [https://buildah.io/ Buildah]
* [[Vagrant]]
* [[Docker]]
* [[Qemu]]


| valign="top" |
| valign="top" |
* [https://www.redhat.com/sysadmin/share-container-image-podman-save <code>podman save</code> share container images]
* [https://developers.redhat.com/blog/2019/02/21/podman-and-buildah-for-docker-users Podman and Buildah for Docker users]
* [https://developers.redhat.com/blog/2020/11/19/transitioning-from-docker-to-podman Transitioning from Docker to Podman]
* [[Multipass]]
* [[Proxmox]]
* [[Juju]]


|}
|}

Latest revision as of 23:22, 28 November 2023

. /etc/os-release
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d /devel:kubic:libcontainers:stable.list
curl -L "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key" | sudo apt-key add -
apt update
apt upgrade
apt install podman

Add Registries

podman login hub.chorke.org -u academia -p sadaqah!

sudo tee -a /etc/containers/registries.conf >>/dev/null <<'EOF'

[registries.search]
registries = ['hub.chorke.org', 'hub.docker.com', 'docker.io', 'quay.io', 'ghcr.io']
EOF

podman pull chorke/crawler:1.0.00

? Please select an image: 
  ▸ hub.chorke.org/chorke/crawler:1.0.00
    hub.docker.com/chorke/crawler:1.0.00
    docker.io/chorke/crawler:1.0.00
    quay.io/chorke/crawler:1.0.00
    ghcr.io/chorke/crawler:1.0.00

✔ hub.chorke.org/chorke/crawler:1.0.00
Trying to pull hub.chorke.org/chorke/crawler:1.0.00...
Getting image source signatures
Copying blob f910a506b6cb done  
Copying blob dff385d19640 [=======>------------------------------] 21.9MiB / 101.3MiB
Copying blob e7c96db7181b done  
Copying blob c2274a1a0e27 [=========>----------------------------] 17.9MiB / 67.5MiB

Manage Images

podman pull fedora:latest
podman run -it fedora bash
~/.local/share/containers

Docker Removal

systemctl stop docker
yum -y remove docker
podman pull fedora:latest

Knowledge

podman logs –latest
podman inspect –l
podman --version 
podman version
podman --help
podman ps
podman login  hub.chorke.org -u academia -p sadaqah!
podman login  reg.chorke.org -u academia -p sadaqah!


podman logout hub.chorke.org
podman logout reg.chorke.org

podman run --name='crawler' -d -p 1983:1983 chorke/crawler:1.0.00
podman run --rm --name='crawler' -d -p 1983:1983 chorke/crawler:1.0.00
podman run --rm --name='crawler' -d -p 1983:1983 hub.chorke.org/chorke/crawler:1.0.00
ls -lah $HOME/.local/share/containers/storage
rm -rf  $HOME/.local/share/containers/cache/*
du -sh  $HOME/.local/share/containers

References