OSS�̃`���b�g��Ղł���ADocker�R���e�i�Ƃ��ĊȒP�ɓ����ł���RocketChat���g�����A�R�~���j�P�[�V������Ղ̍������w�Ԗ{�A�ځB����́A���ۂ�RocketChat�����\�z���A�A�J�E���g�o�^��`���b�g�Ȃǂ̊�{�I�Ȏg�����ɂ��ĉ�����܂��B
�@�{�A�ځuOSS�`���b�g���RocketChat�����v�ł́AOSS�̃`���b�g��Ղł���Docker���g���ĊȒP�ɍ\�z���ł���RocketChat���g���āA�R�~���j�P�[�V������Ղ̍������w�т܂��B
�@�O��́uSlack�ƈ���ăI���v���~�X���ō���OSS�`���b�g���4�I��RocketChat�̊�b�m���v�ł́A�{�A�ڂŎ��グ��RocketChat�ƁA���̃x�[�X�ƂȂ�Slack�Ƃ̈Ⴂ�A���̑��̃I�[�v���\�[�X�\�t�g�E�F�A�iOSS�j�`���b�g�c�[�����Љ�܂����B����́A���ۂ�RocketChat�����\�z���A�A�J�E���g�o�^��`���b�g�Ȃǂ̊�{�I�Ȏg�����ɂ��ĉ�����܂��B
�@���߂ɁA���ꂩ����RocketChat���̊T�v���Љ�܂��B����́ALinux���iCentOS�j��ɍ\�z���ADocker 1.12.1��œ��삳������̂Ƃ��܂��B�Ȃ��A�ȍ~�ɋL�ڂ���Linux�R�}���h����́A�S�ē������[�U�[�Ŏ��s���܂��B
�@����g�p����v���_�N�g����уo�[�W�����͕\1�̒ʂ�ł��B
�v���_�N�g�� | �o�[�W���� |
---|---|
CentOS | 7.2 |
Docker | 1.12.1 |
MongoDB | 3.2.9 |
RocketChat | 0.37.1 |
Docker Compose | 1.8.0 |
# cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) # uname -r -s -m Linux 3.10.0-327.28.3.el7.x86_64 x86_64
# docker version Client: Version: 1.12.1 API version: 1.24 Go version: go1.6.3 Git commit: 23cf638 Built: OS/Arch: linux/amd64 Server: Version: 1.12.1 API version: 1.24 Go version: go1.6.3 Git commit: 23cf638 Built: OS/Arch: linux/amd64
�@������RocketChat���̊T�v�͐}1�̒ʂ�ł��B
�@RocketChat�̃f�[�^���i�[���邽�߂̃f�[�^�x�[�X�ł��B
�@�{�A�ڂŎ��グ��OSS�`���b�g��Ղł��B
�@������Docker�R���e�i���g�p����A�v���P�[�V�������`���A�Ǘ��ł���c�[���ł��B������Docker�R���e�i��1�̃T�[�r�X�Ƃ��Ĉ������Ƃ��ł��܂��B����ARocketChat�R���e�i��MongoDB�R���e�i�Ƃ���2�̃R���e�i���g�p���邽�߁ADocker Compose���g����1�̃A�v���P�[�V�����Ƃ��ĊǗ����܂��B
�@����ł́A���ۂ�RocketChat��������Ă����܂��傤�B�\�z�͈ȉ��̗���ōs���܂��B
�@RocketChat�̃f�[�^���i�[����MongoDB�̃R���e�i�C���[�W��pull�Ŏ擾���܂��B
# docker pull mongo Using default tag: latest latest: Pulling from library/mongo 5c68a10e9f3f: Pull complete 0110f95fa9c8: Pull complete 0cba4a42bc41: Pull complete a6eafd7fba3f: Pull complete 703d9d7e0e21: Pull complete 6c18d5bc22c9: Pull complete fd3fcba178e3: Pull complete c8b9b5488049: Pull complete 41f37d58ab4c: Pull complete Digest: sha256:beff97308c36f7af664a1d04eb6ed09be1d14c17427065b2ec4b0de90967bb3f Status: Downloaded newer image for mongo:latest #
�@MongoDB�R���e�i�C���[�W��pull�ł������́A�udocker images�v�R�}���h�Ŋm�F�ł��܂��B�ȉ��̂悤�Ɂumongo�v���lj�����Ă���ΐ����ł��B
# docker images REPOSITORY TAG IMAGE ID CREATED SIZE mongo latest af52553e1c34 3 days ago 327 MB #
�@RocketChat�̃R���e�i�C���[�W��pull�Ŏ擾���܂��B
# docker pull rocketchat/rocket.chat Using default tag: latest latest: Pulling from rocketchat/rocket.chat 357ea8c3d80b: Pull complete cf5d621a220e: Pull complete 9f71cc4e09fc: Pull complete 2ac64b3dc65b: Pull complete 8f252f9e0a81: Pull complete Digest: sha256:16da8ab5960101411df99fb99a9a7c4a8c881eb39f8bf53e79b3cb6ae6c824c9 Status: Downloaded newer image for rocketchat/rocket.chat:latest #
�@�������ARocketChat�R���e�i�C���[�W��pull�ł������m�F���܂��B�ȉ��̂悤�Ɂurocketchat/rocket.chat�v���lj�����Ă���ΐ����ł��B
# docker images REPOSITORY TAG IMAGE ID CREATED SIZE rocketchat/rocket.chat latest d4cc7fb62744 3 days ago 405.2 MB mongo latest af52553e1c34 3 days ago 327 MB #
�@2�̃R���e�i�C���[�W��pull����܂����B
�@Docker Compose���C���X�g�[�����܂��BDocker Compose�́A�ȉ��̃R�}���h�ŃC���X�g�[���ł��܂��B�Ȃ��A�u1.8.0�v�̓C���X�g�[������Docker Compose�̃o�[�W�����ł��B�����ł�2016�N8�����_�̍ŐV�ł��C���X�g�[�����Ă��܂����A�K�X�C���X�g�[������o�[�W�������w�肵�Ă��������i�ŐV�ł́uhttps://docs.docker.com/compose/install/�v���Q�Ɓj�B
# curl -L https://github.com/docker/compose/releases/download/1.8.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 600 0 600 0 0 522 0 --:--:-- 0:00:01 --:--:-- 523 100 7783k 100 7783k 0 0 405k 0 0:00:19 0:00:19 --:--:-- 583k # chmod +x /usr/local/bin/docker-compose # docker-compose -version docker-compose version 1.8.0, build f3628c7 #
�@Docker Compose�̓C���X�g�[�����Ă���Docker�ƑΉ������o�[�W�������C���X�g�[������K�v������܂��ihttps://github.com/docker/compose/releases�j�B
�@CentOS 6�n���g�p���Ă���ꍇ�A�ʏ�C���X�g�[�������Docker�̃o�[�W������1.7�n�ł��邽�߁ADocker Compose�̍ŐV�ł��C���X�g�[�����Ă��܂��Ɛ��������삵�Ȃ����Ƃ�����܂��B
�@�Ō�ɁADocker Compose�t�@�C���iYAML�t�@�C���j���쐬���ARocketChat���N�����܂��B�܂��AMongoDB�̃f�[�^���z�X�g���Ƀ}�E���g���邽�߂̃f�B���N�g�����쐬���܂��B�����ł́u/var/www/�v�z���ɍ쐬���Ă��܂����A���g�̊��ɍ��킹�ďC�����Ă��������B
# mkdir -p /var/www/rocket.chat/data/runtime/db # mkdir -p /var/www/rocket.chat/data/dump #
�@���ɁADocker Compose�t�@�C�����쐬���܂��B�u/var/www/rocket.chat/docker-compose.yml�v��p�ӂ��A���L�̂悤�ɍX�V���Ă��������B
db: # �R���e�i�C���[�W���w��iimage:�R���e�i�C���[�W��:�^�O���j image: mongo:latest # �R���e�i�̃f�[�^���{�����[���Ƃ��ăz�X�gOS�Ƀ}�E���g volumes: # MongoDB�̃f�[�^���}�E���g - ./data/runtime/db:/data/db # MongoDB��dump�t�@�C�����}�E���g - ./data/dump:/dump # MongoDB��journal�t�@�C����smallfiles�Ƃ��� command: mongod --smallfiles rocketchat: # �R���e�i�C���[�W���w��iimage:�R���e�i�C���[�W��:�^�O���j image: rocketchat/rocket.chat:latest # ���ϐ���ݒ� environment: # MongoDB�idb�j��URL���w�� - MONGO_URL=mongodb://db:27017/rocketchat # RocketChat��URL�i�����ł̓z�X�g����localhost�Ƃ��Ă��܂��j - ROOT_URL=http://localhost # �A�J�E���g�̃��[���A�h���X�̃h���C���`�F�b�N���� - Accounts_UseDNSDomainCheck=false # MongoDB�idb�j�ւ̃����N���w�� links: - db:db # RocketChat�̃|�[�g��ݒ� ports: - 3000:3000
�@Docker Compose�t�@�C�����쐬������A���悢��RocketChat�̋N���ł��i���m�Ɍ����ƁARocketChat�R���e�i��MongoDB�R���e�i���쐬���܂��j�B
# cd /var/www/rocket.chat/ # docker-compose up -d Creating rocketchat_db_1 Creating rocketchat_rocketchat_1 #
�@�R���e�i���쐬�ł������m�F���܂��B�urocketchat_db_1�v�Ɓurocketchat_rocketchat_1�v��State���uUp�v�ƂȂ��Ă���ΐ����ł��B
# docker-compose ps Name Command State Ports ----------------------------------------------------------------------------------------- rocketchat_db_1 /entrypoint.sh mongod --sm ... Up 27017/tcp rocketchat_rocketchat_1 node main.js Up 0.0.0.0:3000->3000/tcp #
�@�쐬�ł�����A�ȉ�URL�A�N�Z�X���ARocketChat�ɐڑ����Ă݂܂��傤�B
http://�oIP�A�h���X�܂��̓z�X�g���p:3000/
�@���O�C����ʂ��\�����ꂽ��ARocketChat�̍\�z�͊����ł��B
�@�Ȃ��ARocketChat�͈ȉ��R�}���h�ŋN��/��~���邱�Ƃ��ł��܂��B
# docker-compose start Starting db ... done Starting rocketchat ... done #
# docker-compose stop Stopping rocketchat_rocketchat_1 ... done Stopping rocketchat_db_1 ... done #
�@CentOS 7�ł́A�f�t�H���g��yum���g����Docker���C���X�g�[�����邱�Ƃ��ł��܂��B�������A�f�B�X�g���r���[�V�����̃��|�W�g���ɂ͍ŐV�ł�Docker���z�z����Ă���Ƃ͌���Ȃ��̂ŁA�Â��o�[�W������Docker���C���X�g�[������邱�Ƃ�����܂��B
�@����̊��ł���CentOS 7.2�ɂ����Ă��A�ʏ��Docker 1.10.1���C���X�g�[������Ă��܂��܂��B�������ACentOS 7.2��Docker 1.10.1�ł́A���\�z���ɁAMongoDB�ł̃f�B���N�g���}�E���g�̐ݒ�i./data/runtime/db:/data/db�j�ňȉ��̃G���[���o�͂���AMongoDB���N���ł��Ȃ����ۂ��������邱�Ƃ��������Ă��܂��B
# docker-compose up docker mongo chown: changing ownership of `/data/db`: Permission denied
�@Docker�̃o�[�W�������Â����ƂɋN�����Ă��܂��̂ŁA�Ȃ�ׂ��ŐV�ł�Docker���g�p����悤�ɂ��Ă��������B
Copyright © ITmedia, Inc. All Rights Reserved.