24
25

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

ALMiniumが動作するdockerイメージを作成した

Last updated at Posted at 2014-07-12

このイメージは古いので以下をご利用ください。


以下古い記事

Redmine 2.5.2

ファイルは以下をバックアップすればよさそう

パス 用途
/var/lib/mysql/ mysql
/opt/alminium/files/ redmineの添付ファイル
/var/opt/alminium/ ソースコードリポジトリ

起動方法

jenkinsなし (1.179 GB)

ALMinium起動方法
mkdir -p $HOME/alminium/files/
mkdir -p $HOME/alminium/mysql/
mkdir -p $HOME/alminium/repos/

docker run \
 -i \
 -p 80:80 \
 -v $HOME/alminium/files/:/opt/alminium/files/ \
 -v $HOME/alminium/mysql/:/var/lib/mysql/ \
 -v $HOME/alminium/repos/:/var/opt/alminium/ \
 -t tukiyo3/centos6-ja-alminium:no_jenkins /bin/bash

jenkins付き (1.601 GB)

ALMinium起動方法
mkdir -p $HOME/alminium/files/
mkdir -p $HOME/alminium/mysql/
mkdir -p $HOME/alminium/repos/

docker run \
 -i \
 -p 80:80 \
 -v $HOME/alminium/files/:/opt/alminium/files/ \
 -v $HOME/alminium/mysql/:/var/lib/mysql/ \
 -v $HOME/alminium/repos/:/var/opt/alminium/ \
 -t tukiyo3/centos6-ja-alminium:jenkins /bin/bash

作成手順

共通
docker run -it tukiyo3/centos-ja:6.5 /bin/bash

yum install --enablerepo=centosplus -y openssl-devel
yum install -y git which tar libyaml

cd /opt
git clone https://github.com/alminium/alminium.git
cd alminium

jenkins無し

jenkins無し
ALM_HOSTNAME=localhost SSL=N ENABLE_JENKINS=N SMTPSET=N USER=root bash ./smelt

yum clean all

echo "/etc/init.d/mysqld start" >> /.bashrc
echo "/etc/init.d/httpd start" >> /.bashrc

jenkinsあり

jenkinsあり
ALM_HOSTNAME=localhost SSL=N ENABLE_JENKINS=y SMTPSET=N USER=root bash ./smelt

yum clean all

echo "/etc/init.d/jenkins start" >> /.bashrc
echo "/etc/init.d/mysqld start" >> /.bashrc
echo "/etc/init.d/httpd start" >> /.bashrc

mysqlのutf-8化

mysqlのutf-8化も忘れずにしておく

/etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
#
character-set-server=utf8
skip-character-set-client-handshake

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[client]
default-character-set=utf8

[mysqldump]
default-character-set=utf8

自分のバックアップの仕方

$ docker ps -a
CONTAINER ID        IMAGE                             COMMAND             CREATED             STATUS              PORTS                            NAMES
673a0ffbbe1a        private/alminium-jenkins:latest   "/bin/bash"         3 weeks ago         Up 3 days           8080/tcp, 0.0.0.0:8081->80/tcp   grave_sammet
$ docker images
REPOSITORY                 TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
private/alminium-jenkins   20140719            15071cbf85af        3 months ago        1.838 GB
$ docker commit -a "tukiyo3 <tukiyo3@gmail.com>" 673a0ffbbe1a private/alminium-jenkins:20141023
8cad8c5ea52eb8574b4aa35aa9b9818f7c68e95e02e8d79f02313b119af00c18
$ docker save -o alminium.20141023.tar private/alminium-jenkins:20141023
  • alminium.20141023.tarを大切に保管。
復元
$ docker load -i alminium.20141023.tar
$ docker images
24
25
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
24
25

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?