こちらを参考にしました。
Docker Composeを使用してインストールする
Arch Linux を使いました。
データベースは、sqlite3 です。
インストール
docker が動いていることを確認
$ sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; preset: >
Active: active (running) since Wed 2023-03-08 08:29:40 JST; 8min ago
ソースのダウンロード
wget https://downloads.ec-cube.net/src/eccube-4.2.1.tar.gz
ソースの解凍
tar xvfz eccube-4.2.1.tar.gz
インストール
cd ec-cube/
docker-compose up -d
docker-compose exec -u www-data ec-cube bin/console eccube:install -n
コンテナの起動
docker-compose up -d
コンテナの停止
docker-compose down
フロント画面
管理画面
ユーザー admin
パスワード password
でログイン
状況の確認
$ 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 32 minutes ago Up 32 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 32 minutes ago Up 32 minutes 0.0.0.0:1025->1025/tcp, :::1025->1025/tcp, 0.0.0.0:1080->1080/tcp, :::1080->1080/tcp
ログイン
$ docker exec -it ec-cube-ec-cube-1 bash
root@f079b00b4bfc:/var/www/html#
PHP
root@f079b00b4bfc:/var/www/html# php --version
PHP 7.4.33 (cli) (built: Nov 15 2022 06:03:30) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
データベース
root@f079b00b4bfc:/var/www/html# file var/eccube.db
var/eccube.db: SQLite 3.x database, last written using SQLite version 3034001
Web サーバー
root@f079b00b4bfc:/var/www/html# apache2 -v
Server version: Apache/2.4.54 (Debian)
Server built: 2022-06-09T04:26:43