1
2

【メモ】Docker + Crowi に関するメモ書き

Last updated at Posted at 2017-02-02

docker+crowi を入れようとして、以下の記事を参考にやってみたところ、2カ所はまった。

DockerfileでCrowiのビルドとDocker ComposeでCrowiの実行

動作環境: Ubuntu 16.04 LTS

##docker-compose で version 2 を動かせない。

docker-compose up

以下のエラーを吐いて止まる。

ERROR: In file './docker-compose.yml' service 'version' doesn't have any configuration options. All top level keys in your docker-compose.yml must map to a dictionary of configuration options.

これは、apt-getでインストールしたdocker-composeが古いためらしいので、
GitのDockerサイトに従い新しいものをゲットした。
具体的には、

curl -L https://github.com/docker/compose/releases/download/1.10.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

を実施。うちの環境ではpathが通っていないので、その後下記を実行して置き換えた。

mv /usr/bin/docker-compose /usr/bin/docker-compose.org
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

##Upstartが接続を拒否する

docker-compose up

がまたエラーを吐いて止まる。

Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused

versionエラーは回避したものの、次はDockerが起動しないっぽい。
そこでここを参考にした。DockerのUbuntuイメージでMySQLを動かしたい

dpkg-divert --local --rename --add /sbin/initctl
ls -l /sbin/initctl          # ここの2行は確認
ls -l /sbin/initctl.distrib  #
ln -s /bin/true /sbin/initctl

これでやっと

docker-compose up

が動作し、Crowiが使えた。

1
2
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
1
2