こちらを参考にしました。
Docker Composeを使用してインストールする
Arch Linux を使いました。
データベースは、PostgreSQL です。
インストール
ソースコードのダウンロードと解凍はこちらと同じです。
eccube-4.2.1 を Docker Compose でインストール (sqlite3)
インストール
cd ec-cube/
docker-compose -f docker-compose.yml -f docker-compose.pgsql.yml up -d
コンテナーの様子
$ docker-compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
ec-cube-ec-cube-1 ghcr.io/ec-cube/ec-cube-php:8.1-apache "docker-php-entrypoi…" ec-cube 12 minutes ago Up 12 minutes (healthy) 0.0.0.0:8080->80/tcp, :::8080->80/tcp, 0.0.0.0:4430->443/tcp, :::4430->443/tcp
ec-cube-mailcatcher-1 schickling/mailcatcher "sh -c 'mailcatcher …" mailcatcher 12 minutes ago Up 12 minutes 0.0.0.0:1025->1025/tcp, :::1025->1025/tcp, 0.0.0.0:1080->1080/tcp, :::1080->1080/tcp
ec-cube-postgres-1 postgres:14 "docker-entrypoint.s…" postgres 12 minutes ago Up 12 minutes (healthy) 0.0.0.0:15432->5432/tcp, :::15432->5432/tcp
フロント画面
管理画面
DBサーバー
PostgreSQL 14.7 (Debian 14.7-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
データベースにアクセス
$ docker exec -it ec-cube-postgres-1 bash
root@bfbd379d4888:/# psql -U dbuser eccubedb
psql (14.7 (Debian 14.7-1.pgdg110+1))
Type "help" for help.
eccubedb=# \db
List of tablespaces
Name | Owner | Location
------------+--------+----------
pg_default | dbuser |
pg_global | dbuser |
(2 rows)
eccubedb=#