Projekt

Allgemein

Profil

Aktionen

Podman » Historie » Revision 3

« Zurück | Revision 3/12 (Vergleich) | Weiter »
Jeremias Keihsler, 23.09.2021 12:53


Podman

install

yum install podman
yum install podman-compose

create container

see also:
https://www.redhat.com/sysadmin/wordpress-container
https://rancher.com/learning-paths/how-to-build-and-run-your-own-container-images/
https://docs.podman.io/en/latest/markdown/podman-build.1.html

create ~/container.user/wordpress.user/Dockerfile

FROM docker.io/rockylinux/rockylinux
MAINTAINER jke <j@keihsler.com>
RUN dnf module enable -y php:7.4
RUN yum install -y mariadb-server mariadb php php-apcu php-intl php-mbstring php-xml php-json php-mysqlnd crontabs cronie iputils net-tools;yum clean all
RUN systemctl enable mariadb
RUN systemctl enable httpd
RUN systemctl disable systemd-update-utmp.service
ENTRYPOINT ["/sbin/init"]
CMD ["/sbin/init"]
cd ~/container.user/wordpress.user/
podman build -t wordpress_user .

compose pod

create ~/compose.user/nextcloud.user/compose.yml

version: '3'

services:

  db:
    image: mariadb
    container_name: nextcloud-mariadb
    networks:
      - nextcloud_network
    volumes:
      - db:/opt/nextcloud/mysql
      - /etc/localtime:/etc/localtime:ro
    environment:
      - MYSQL_ROOT_PASSWORD=XXXXX
      - MYSQL_PASSWORD=XXXXX
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
    restart: unless-stopped

  app:
    image: nextcloud:latest
    container_name: nextcloud-app
    ports:
      - 9099:80
    networks:
      - nextcloud_network
    depends_on:
      - db
    volumes:
      - nextcloud:/var/www/html
      - ./app/config:/var/www/html/config
      - ./app/custom_apps:/var/www/html/custom_apps
      - ./app/data:/var/www/html/data
      - ./app/themes:/opt/nextcloud/www/html/themes
      - /etc/localtime:/etc/localtime:ro
    environment:
      - VIRTUAL_HOST=ak-i40-cloud.openfab.org
    restart: unless-stopped

volumes:
  nextcloud:
  db:

networks:
  nextcloud_network:

Von Jeremias Keihsler vor etwa 3 Jahren aktualisiert · 3 Revisionen