0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

EC-CUBE+Docker Compose 環境構築手順

Last updated at Posted at 2022-06-28

検証環境

  • Windows 10 Pro
  • Docker Desktop for Windows

GitHubからリポジトリをClone

Windows環境でGit Cloneすると、ファイルの改行コードがWindows標準のCRLFになってしまい、
起動時にstandard_init_linux.go:211: exec user process caused "no such file or directory"というエラーが発生してしまいます。
Linux環境でリポジトリをCloneすることにより回避できます。

Windows PowerShellよりwslを起動します

PowerShell
wsl

リポジトリを作成するディレクトリへ移動します

以下の例では、dockerディレクトリ

PowerShell
cd docker

GitHubへアクセスし、リポジトリのURLを取得します

EC-CUBEのサイトよりGitHubを確認します

image.png

クローンします

取得したリポジトリURLを指定して、クローンします

PowerShell
git clone https://github.com/EC-CUBE/ec-cube.git

コンテナを起動します

PowerShell
docker-compose up -d

初回はインストールスクリプトを実行します

PowerShell
docker-compose exec -u www-data ec-cube bin/console eccube:install -n

MySQL

docker-compose.mysql.yml を指定します。

PowerShell
docker-compose -f docker-compose.yml -f docker-compose.mysql.yml up -d

データベーススキーマを初期化

スキーマ作成と初期データ投入を行います。

PowerShell
docker-compose -f docker-compose.yml -f docker-compose.mysql.yml exec ec-cube composer run-script compile

ブラウザよりアクセスする

以下のURLにアクセスする。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?