dockerのCentOS  (Core) にbitnamiのredmineを入れるgoogle認証する方法

document
redmineにgoogle認証できるようにするプラグイン
redmine_omniauth_google
https://github.com/yamamanx/redmine_omniauth_google  2015/3
https://github.com/twinslash/redmine_omniauth_google  2015/7

centos版
docker pull centos:7
docker run --privileged -d -p 80:80 --name NAME 49f7960eb7e4 /sbin/init
docker start NAME
docker exec -it NAME /bin/bash
yum -y update
yum -y install wget glibc-devel perl perl-Data-Dumper git
wget https://bitnami.com/redirect/to/326905/bitnami-redmine-3.4.6-3-linux-x64-installer.run
chmod 700 bitnami-redmine-3.4.6-2-linux-x64-installer.run
./bitnami-redmine-3.4.6-2-linux-x64-installer.run
cd /opt/redmine/apps/redmine/htdocs/plugins
git clone https://github.com/twinslash/redmine_omniauth_google.git
yum groupinstall -y "Development Tools"
yum install -y kernel-devel kernel-headers
yum install -y epel-release
yum install -y ruby ruby-devel libxml2-devel libxslt-devel sqlite-devel
yum -y install gcc

/opt/redmine/use_redmine　でbashを開いて
cd /opt/redmine/apps/redmine/htdocs/
bundle install --no-deployment


--centos上でdocker
docker run --privileged -d -p 80:80 --name NAME 49f7960eb7e4 /sbin/init
docker start NAME
docker exec -it NAME /bin/bash
yum -y update
ココに書いてあるとおり
https://docs.docker.com/install/linux/docker-ce/centos/#upgrade-docker-ce


--ubuntu版
docker images
docker run -i -t -p 80:80 --name ruc1 c2ad76
apt-get -y update
apt -y install tzdata wget language-pack-ja-base language-pack-ja
locale-gen ja_JP.UTF-8
echo export LANG=ja_JP.UTF-8 >> ~/.profile
source ~/.profile
date
apt-get -y install yum
yum install -y perl-Data-Dumper
wget https://bitnami.com/redirect/to/326905/bitnami-redmine-3.4.6-3-linux-x64-installer.run
chmod 700 bitnami-redmine-3.4.6-3-linux-x64-installer.run 
./bitnami-redmine-3.4.6-3-linux-x64-installer.run
apt-get -y install build-essential ruby-full git
cd /opt/redmine/apps/redmine/htdocs/plugins
git clone https://github.com/twinslash/redmine_omniauth_google.git
cd ../

あれ？gem updateがいるのかな？
gem install bundler
bundle install --no-deployment

apt-get -y install liblzma-dev patch ruby-dev zlib1g-dev
apt-get -y install libmysqld-dev imagemagick libmagick++-dev
bundle install --no-deployment
gem uninstall rmagick
gem install rmagick
bundle install --no-deployment
cd /opt/redmine
./ctlscript.sh restart

最後の最後でサーバーエラーが出る。

--直接 sameersbn 版redmine
もう直接dockerでredmineのイメージを入れよう
docker pull sameersbn/redmine
ここ試す
https://hub.docker.com/_/redmine/

https://blog.ybbo.net/2015/01/26/redmine%E3%81%AE%E3%83%A6%E3%83%BC%E3%82%B6%E8%AA%8D%E8%A8%BC%E3%81%AB%E3%80%8Credmine_omniauth_google%E3%80%8D%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9/

--直接redmine　ubuntu版
あ、ubuntu
docker run -d --name redmine -p 80:3000 redmine:latest
docker start redmine
docker exec -it redmine /bin/bash
cd /usr/src/redmine/plugins
git clone https://github.com/twinslash/redmine_omniauth_google.git
cd /usr/src/redmine
apt-get update
apt-get install build-essential
bundle install
エラー出るので　以下のページに書いてるものをする
https://hacknote.jp/archives/8539/
gem uninstall json
gem install json
exit
docker stop redmine
docker start redmine
docker exec -it redmine /bin/bash


あとはココを見る
https://kitaney-google.blogspot.com/2014/02/redmine-with-googleapps-auth.html

--amazonlinux
docker pull amazonlinux:1
docker run -it amazonlinux:1

--バックアップ方法
http://redmine.jp/faq/system_management/backup/
firezillaで接続
files取る

mkdir /opt/redmine/backup/
chmod 777 /opt/redmine/backup/
mysqlはここで動かす
./mysqldump -uUSERID -pパスワード bitnami_redmine > /opt/redmine/backup/a.dump