退役SEのつれづれ日記

定年退役SEが、つれづれなる想いをしたためています。
(旧名:『システムノヲニワソト』)

[docker][redmine](続)Windows Subsystem for Linux2(WSL2)でdockerを起動する

2021-03-04 | Weblog
windows10でdockerを試験したい。そのための環境の準備の続きとして
(3) bitnamiのdockerコンテナを使用して、redmine+mariaDBを起動(docker-compose使用)
を実施する。

まずは、hello-worldコンテナを動かしてみます。

$ sudo docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 0e03bdcc26d7: Pull complete Digest: sha256:95ddb6c31407e84e91a986b004aee40975cb0bda14b5949f6faac5d2deadb4b9 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/ For more examples and ideas, visit: https://docs.docker.com/get-started/

問題無く、コンテナが起動しました。

(3) bitnamiのdockerコンテナを使用して、redmine+mariaDBを起動(docker-compose使用)
bitnamiのredmine stackはオールインワンのものが有名ですが、dockerコンテナとしての機能提供もあります。

(参考)
1.bitnami:Home > Applications > Bug Tracking > Redmine > Containers
https://bitnami.com/stack/redmine/containers

2.docker hub: bitnami/redmine
https://hub.docker.com/r/bitnami/redmine/


まずは、docker-composeの導入。

$ uname -s Linux $ uname -m x86_64 $ uname -a Linux Windows10PC 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux $ sudo curl -L "https://github.com/docker/compose/releases/download/1.28.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 633 100 633 0 0 2131 0 --:--:-- --:--:-- --:--:-- 2131 100 11.6M 100 11.6M 0 0 2195k 0 0:00:05 0:00:05 --:--:-- 2486k $ sudo chmod +x /usr/local/bin/docker-compose $ sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose $ docker-compose --version docker-compose version 1.28.4, build cabd5cfb


次に、redmine用のdocker-composeファイルをダウンロードして、コンテナを起動。

$ curl -sSL https://raw.githubusercontent.com/bitnami/bitnami-docker-redmine/master/docker-compose.yml > docker-compose.yml $ ls docker-compose.yml $ sudo docker-compose up -d Building with native build. Learn about native build in Compose here: https://docs.docker.com/go/compose-native-build/ Creating network "bitnami_default" with the default driver Creating volume "bitnami_mariadb_data" with local driver Creating volume "bitnami_redmine_data" with local driver Pulling mariadb (docker.io/bitnami/mariadb:10.3-debian-10)... 10.3-debian-10: Pulling from bitnami/mariadb 03380af19a3d: Pull complete 91c3ab42ca2a: Pull complete 08e273fcd960: Pull complete 72429b87d3f8: Pull complete 871d88979f5e: Pull complete 0176c6f4046b: Pull complete 781766b37f8f: Pull complete 96f2b1eeb128: Pull complete 329557e5551a: Pull complete f6e587eab606: Pull complete Digest: sha256:44f5b5b7fb98b8e3c63f23eda27c2fcff2c49745dd87c33d522eb6413c57ec1f Status: Downloaded newer image for bitnami/mariadb:10.3-debian-10 Pulling redmine (docker.io/bitnami/redmine:4-debian-10)... 4-debian-10: Pulling from bitnami/redmine 03380af19a3d: Already exists c282a9c130e6: Pull complete 7cd26a647af3: Pull complete 29b95577ece8: Pull complete ba2653507f1d: Pull complete eb46d790107d: Pull complete 17d2abc721ad: Pull complete 42150097d3f1: Pull complete c07dc544d6f3: Pull complete cf0bc517ed7b: Pull complete 9c8e7f97b406: Pull complete 8e25e47a71ed: Pull complete ede742ea0b2b: Pull complete Digest: sha256:05fea27d831900dae5f49a7f7ed204689b5661d7aeff23b91fa24eacc08427eb Status: Downloaded newer image for bitnami/redmine:4-debian-10 Creating bitnami_mariadb_1 ... done Creating bitnami_redmine_1 ... done $ sudo docker container ls CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3ec1da50f02d bitnami/redmine:4-debian-10 "/app-entrypoint.sh …" About a minute ago Up About a minute 0.0.0.0:80->3000/tcp bitnami_redmine_1 cead87a124ea bitnami/mariadb:10.3-debian-10 "/opt/bitnami/script…" About a minute ago Up About a minute 3306/tcp bitnami_mariadb_1


これで。redmineが起動。mariaDBと別コンテナで稼働中。
バージョンは4.1.1-2なので、単一のstackとはちょっと違うが問題なし。
あとは、テーマの導入、pluginの導入、そしてデータの移行となればOKなのだが、実はちょっとした問題が発覚。
それは、次回に。

コメント    この記事についてブログを書く
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする
« [docker][redmine]Windows Su... | トップ | [docker][redmine](完結)Wi... »