Howto podman: Difference between revisions
Jump to navigation
Jump to search
Line 37: | Line 37: | ||
log out of the current remote registry | log out of the current remote registry | ||
podman logout | podman logout | ||
= private registry = | |||
compose file to create registry: | |||
version: '3' | |||
services: | |||
registry: | |||
image: registry:2 | |||
ports: | |||
- "5000:5000" | |||
environment: | |||
REGISTRY_AUTH: htpasswd | |||
REGISTRY_AUTH_HTPASSWD_REALM: Registry | |||
REGISTRY_AUTH_HTPASSWD_PATH: /auth/registry.password | |||
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /data | |||
volumes: | |||
- ./auth:/auth | |||
- ./data:/data |
Revision as of 23:51, 30 January 2023
install podman archlinux
install podman packages:
pacman -Syu podman podman-compose
install podman centos/almalinux/rocky
install podman packages:
yum -y install podman
install podman-compose:
curl -o /usr/local/bin/podman-compose https://raw.githubusercontent.com/containers/podman-compose/devel/podman_compose.py chmod +x /usr/local/bin/podman-compose
install podman debian/ubuntu
install podman packages:
apt-get -y install podman
install podman-compose:
curl -o /usr/local/bin/podman-compose https://raw.githubusercontent.com/containers/podman-compose/devel/podman_compose.py chmod +x /usr/local/bin/podman-compose
commands
create container image:
podman build -f Dockerfile
list containers that are running or have exited:
podman ps -a
remove a container image by its image:
podman rmi docker.io/library/almalinux:8
pull container image from docker.io:
podman pull docker.io/library/almalinux:9
list all local images:
podman images
display information about how an image was built
podman history docker.io/library/almalinux:9
log in to a remote registry:
podman login registryURL -u username -p password
pull an image from a remote registry:
podman pull registry/username/image:tag
search local cache and remote registries for images:
podman search searchString
log out of the current remote registry
podman logout
private registry
compose file to create registry:
version: '3' services: registry: image: registry:2 ports: - "5000:5000" environment: REGISTRY_AUTH: htpasswd REGISTRY_AUTH_HTPASSWD_REALM: Registry REGISTRY_AUTH_HTPASSWD_PATH: /auth/registry.password REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /data volumes: - ./auth:/auth - ./data:/data