Podman Examples
podman pull imagename
podman run imagename
Example:
podman pull hello-world
podman run hello-world
podman container ls
podman container ls -a
podman image ls
docker pull neo4j
docker run neo4jLast updated
podman pull imagename
podman run imagename
Example:
podman pull hello-world
podman run hello-world
podman container ls
podman container ls -a
podman image ls
docker pull neo4j
docker run neo4jLast updated
mkdir neo4j
cd neo4j
mkdir data
mkdir logspodman run -it -d --name myneo --publish=7474:7474 --publish=7687:7687 --volume=$PWD/data:/data --volume=$PWD/logs:/logs neo4j:latestpodman run -it -d --name myneo --publish=7474:7474 --publish=7687:7687 -v data:/data -v logs:/logs neo4j:latestpodman exec -it containername bashpodman logs containername# Use an official Ubuntu base image
FROM ubuntu:latest
# Install nginx
RUN apt-get update && apt-get install -y nginx
# Expose port 80
EXPOSE 80
# Run nginx
CMD ["nginx", "-g", "daemon off;"]podman build -t gc-nginx-image .podman run --name my-web-app -d -p 8080:80 gc-nginx-image
def add(x, y):
return x + y
def subtract(x, y):
return x - y
def multiply(x, y):
return x * y
def divide(x, y):
if y == 0:
return "Error! Division by zero."
return x / y
if __name__ == "__main__":
print(add(1, 2))
print(subtract(1, 2))
print(multiply(1, 2))
print(divide(1, 2))
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY main.py .
CMD ["python", "./main.py"]
fakerpodman build -t mycalc .podman build -t mycalc -f pathtoDockerfilepodman run --name gccalc mycalc