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 3 years have passed since last update.

Joomlaの環境構築していたら、「ERROR: for joomladock_joomladb_1 Cannot start service joomladb」でコケたので直した。

Posted at

はじめに

Joomlaの環境構築していたら、「ERROR: for joomladock_joomladb_1 Cannot start service joomladb」でコケたので直した。

最終更新日

2022年7月21日

環境の情報

OS
Ubuntu20.04

公式さまはこちら

https://www.joomla.org/
http://www.joomla.jp/

参考さま

https://mebee.info/2020/03/17/post-7561/
https://github.com/docker/compose/releases
https://hub.docker.com/_/joomla
https://linuxhostsupport.com/blog/how-to-install-joomla-4-0-on-ubuntu-20-04/
https://itexpert.tips/ja/joomla-ja/ubuntu-linux%E3%81%ABjoomla%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B/
https://qiita.com/terufumi1122/items/8253a47ff24b64455fe5

作業

ymlファイルこんな感じで作って、

$ cat docker-compose.yml 
version: '3.1'

services:
  joomla:
    image: joomla
    restart: always
    links:
      - joomladb:mysql
    ports:
      - 85:80
    volumes:
      - ./joomladata:/var/www/html
    environment:
      JOOMLA_DB_HOST: joomladb
      JOOMLA_DB_PASSWORD: example

  joomladb:
    image: mysql:5.6
    restart: always
    environment:
      MYSQL_DATABASE: joomla
      MYSQL_ROOT_PASSWORD: example
    volumes:
      - ./mysql:/var/lib/mysql
    ports:
      - "3306:3306"


compose upします。

$ docker-compose up -d
Creating network "joomladock_default" with the default driver
Pulling joomladb (mysql:5.6)...
5.6: Pulling from library/mysql


ふんふん( ・ิω・ิ)♫

バキッ

Status: Downloaded newer image for joomla:latest
Creating joomladock_joomladb_1 ... 
Creating joomladock_joomladb_1 ... error

ERROR: for joomladock_joomladb_1  Cannot start service joomladb: 
driver failed programming external connectivity on endpoint joomladock_joomladb_1 (XXXXXXXXXXXXXXXXXXX)
: Error starting userland proxy: listen tcp4 0.0.0.0:3306: bind: address already in use

ERROR: for joomladb  Cannot start service joomladb: 
driver failed programming external connectivity on endpoint joomladock_joomladb_1 (XXXXXXXXXXXXXXXXXXX)
: Error starting userland proxy: listen tcp4 0.0.0.0:3306: bind: address already in use
ERROR: Encountered errors while bringing up the project.

こうした

ポートかぶりっぽかったので、ここを変更した。

$ cat docker-compose.yml 
    ports:
      - "3307:3307"

そして

再び実行。

Joomladock$ docker-compose up -d
Recreating joomladock_joomladb_1 ... done
Creating joomladock_joomla_1     ... done


OK!
Screenshot from 2022-07-21 15-40-10.png

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?