PodmanでphpMyAdminを起動してみる
3997 ワード
環境
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
$ 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
$ 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
Author And Source
この問題について(PodmanでphpMyAdminを起動してみる), 我々は、より多くの情報をここで見つけました https://qiita.com/rururu_kenken/items/688b032d4d04a6981425著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .