Discover the Ocean
A nature-friendly HTML and CSS visualisation journey, used to demo a podman container build.
Table of contents
No headings in the article.
We already build a Docker container, but since Docker introduced their paid licensing model, people are looking for alternatives, and one of those alternatives is podman. In this write up a quick demo of how to build a podman container.
Repository on GitHub.
macOS version:
Install podman: brew install podman
Initialize podman: podman machine init
Start podman: podman machine start
Check podman version: podman version
We use a Dockerfile with the below content as the base for our nginx image, place the docker file in the root of your folder and name it Dockerfile.pm (it's all in the repo btw):
FROM docker.io/library/alpine:latest
LABEL "copyright"="© 2023 Philip aka RobertoTorino"
LABEL version="1.0"
LABEL description="oceanblue"
LABEL maintainer="Philip aka RobertoTorino"
COPY . /etc/nginx/html EXPOSE 80/tcp
RUN apk update && apk add nginx && apk add nano && mkdir -p /run/nginx && apk add curl shadow bind-tools tcpdump
COPY nginx/nginx.conf /etc/nginx
CMD ["nginx", "-g", "daemon off;"]
HEALTHCHECK --interval=1m --timeout=3s
CMD curl -f http://localhost/ || exit 1
Build the container:
podman build -f
Dockerfile.pm
--format docker -t oceanblue-pm:latest .
Run the application:
podman run -dt -p 9000:80 oceanblue-pm:latest
For a live demo on how to build the container click the picture below: