1/17
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Podman pull command
podman pull
Docker run command
docker run
List all running containers in Podman
podman container ls
List all containers (including stopped) in Docker
docker container ls -a
View all downloaded images in Podman
podman image ls
Create a MySQL container in Podman
podman run --name mysql -d -p 3306:3306 -e MYSQLROOTPASSWORD=root-pwd -e MYSQLROOTHOST="%" -e MYSQLDATABASE=mydb -e MYSQLUSER=remoteuser -e MYSQLPASSWORD=remote_user-pwd docker.io/library/mysql:8.4.4
Meaning of -d in Podman run command
Detached mode (runs in the background).
Log in to a running MySQL container in Podman
podman exec -it mysql bash
Preserve MySQL data in a volume
Add -v ./data:/var/lib/mysql when running the container.
SQL command to create 'friendstvshow' database
CREATE DATABASE IF NOT EXISTS friendstvshow;
Contents of the 'characters' table
Character ID, First Name, Last Name, Actor Name, Date of Birth, Occupation, Apartment Number.
Build a Docker image using Podman
podman build -t
Tag an image for Docker Hub
podman image tag
Push a tagged image to Docker Hub
podman push
Log into Docker Hub using Podman
podman login docker.io
Tool to scan Docker images for vulnerabilities
Trivy
Trivy command for scanning high/critical vulnerabilities
trivy image
Save a Trivy scan result to a file
trivy image