3
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 2.13系をDockerで動かすときのメモ

Last updated at Posted at 2023-01-18

2.13.5をDockerで動かすときのメモ

// git clone
git clone https://github.com/EC-CUBE/ec-cube2.git
cd ec-cube2
git checkout refs/tags/eccube-2.13.5


// 2.17のdocker関連ファイルを取得
(
CURRENT_DIR=$(pwd)
cd /tmp
git clone --depth 1 https://github.com/EC-CUBE/ec-cube2.git
cd ec-cube2
cp -r dockerbuild ${CURRENT_DIR}/
cp Dockerfile ${CURRENT_DIR}/
cp docker-compose.yml ${CURRENT_DIR}/
cp docker-compose.pgsql.yml ${CURRENT_DIR}/
cp docker-compose.mysql.yml ${CURRENT_DIR}/
cp docker-compose.dev.yml ${CURRENT_DIR}/
cp eccube_install.sh ${CURRENT_DIR}/

rm -rf /tmp/ec-cube2
)

// composer1系を利用
sed -i "" 's/composer:2.2/composer:1.10/g' Dockerfile

// 2.13系ではcomposer.lockがないのでコメントアウト
sed -i "" 's/COPY composer.lock/#&/g' Dockerfile

// インストールは別途行うので不要
sed -i "" 's/.*wait-for-pgsql\.sh/#&/g' docker-compose.pgsql.yml
sed -i "" 's/.*wait-for-mysql\.sh/#&/g' docker-compose.mysql.yml

// ビルド
export TAG=5.4-apache
docker build -t ec-cube2 --no-cache --pull \
--build-arg TAG=${TAG} \
--build-arg GD_OPTIONS="--with-freetype-dir=/usr/include --with-jpeg-dir=/usr/include" \
--build-arg EXT_INSTALL_ARGS="gd zip mysql mysqli pgsql mbstring" \
--build-arg APCU=apcu-4.0.11 \
--build-arg FORCE_YES=--force-yes \
./

// タグ付け
docker tag ec-cube2 ghcr.io/ec-cube/ec-cube2-php:${TAG}

// 起動(pgsql)
docker-compose -f docker-compose.yml -f docker-compose.pgsql.yml -f docker-compose.dev.yml up

// 起動(mysql)
docker-compose -f docker-compose.yml -f docker-compose.mysql.yml -f docker-compose.dev.yml up

// ブラウザで開く
open https://localhost:4430/install/

トラブルシュート

mysqlを利用する場合

mysqlを利用する場合、↓の対応が必要
https://qiita.com/cs_sonar/items/d90b8e291c5ea5e2cc4b

apt-getでのエラー

apt-get updateで以下のようなエラーが出る場合

Err http://security.debian.org jessie/updates/main amd64 Packages

apt-get update前に以下を追記する

RUN echo "deb http://archive.debian.org/debian/ stretch main" > /etc/apt/sources.list \
    && echo "deb http://archive.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list
3
0
1

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
3
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?