Podman에서 phpMyAdmin을 시작해보십시오.

3360 단어 phpMyadminPodman

환경



Fedora CoreOS 31.20200113.3.1
Podman 1.7.0
Podman Compose 0.1.5
phpMyAdmin 5.0.1
MariaDB 10.4.12

준비


$ sudo sed -i --follow-symlinks 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/sysconfig/selinux
$ sudo reboot
$ sudo rpm-ostree install python3 -r
$ sudo pip3 install podman-compose
$ mkdir -p ~/.local/bin
$ curl -o ~/.local/bin/podman-compose https://raw.githubusercontent.com/containers/podman-compose/devel/podman_compose.py
$ chmod +x ~/.local/bin/podman-compose

$ mkdir -p mariadb/data
$ chmod 777 mariadb/data
$ mkdir -p phpmyadmin/sessions
$ chmod 777 phpmyadmin/sessions

파일



docker-compose.yml
version: '3.7'

services:
  mariadb:
    container_name: mariadb1
    hostname: mariadb1
    image: mariadb:10.4.12
    volumes:
      - ./mariadb/data:/var/lib/mysql
    env_file:
      - ./.mariadb.env
  phpmyadmin:
    container_name: phpmyadmin1
    hostname: phpmyadmin1
    image: phpmyadmin/phpmyadmin:5.0.1
    env_file:
      - ./.phpadmin.env
    depends_on:
      - mariadb
    ports:
      - 4040:80
    volumes:
      - ./phpmyadmin/sessions:/sessions

.mariadb.env
MYSQL_ROOT_PASSWORD=root
MYSQL_DATABASE=test
MYSQL_USER=test
MYSQL_PASSWORD=test

.phpmyadmin.env
PMA_ARBITRARY=1
PMA_HOST=mariadb
PMA_USER=test
PMA_PASSWORD=test

실행


$ podman-compose up -d
$ podman ps

CONTAINER ID  IMAGE                                  COMMAND               CREATED        STATUS            PORTS                 NAMES
b0cb4cdcbd81  docker.io/phpmyadmin/phpmyadmin:5.0.1  apache2-foregroun...  7 seconds ago  Up 6 seconds ago  0.0.0.0:4040->80/tcp  phpmyadmin1
48b33e725e80  docker.io/library/mariadb:10.4.12      mysqld                8 seconds ago  Up 8 seconds ago  0.0.0.0:4040->80/tcp  mariadb1

좋은 웹페이지 즐겨찾기