CoreOSにDocker Composeがなかったので導入した作業ログ
環境
$ cat /etc/os-release
NAME=CoreOS
ID=coreos
VERSION=738.1.0
VERSION_ID=738.1.0
BUILD_ID=
PRETTY_NAME="CoreOS 738.1.0"
ANSI_COLOR="1;32"
HOME_URL="https://coreos.com/"
BUG_REPORT_URL="https://github.com/coreos/bugs/issues"
$ echo $SHELL
/bin/bash
$ docker version
Client version: 1.6.2
Client API version: 1.18
Go version (client): go1.4.2
Git commit (client): 7c8fca2-dirty
OS/Arch (client): linux/amd64
Server version: 1.6.2
Server API version: 1.18
Go version (server): go1.4.2
Git commit (server): 7c8fca2-dirty
OS/Arch (server): linux/amd64
docker-composeを導入
$ sudo -i
# mkdir -p /opt/bin
# curl -L https://github.com/docker/compose/releases/download/1.4.2/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose
# chmod +x /opt/bin/docker-compose
# docker-compose -v
docker-compose version: 1.4.2
Bash-Completion
https://www.binarysludge.com/2014/10/21/install-bash-completion-on-coreos/
$ toolbox dnf -y install bash-completion wget \
&& toolbox wget https://raw.githubusercontent.com/docker/docker/master/contrib/completion/bash/docker -O /usr/share/bash-completion/completions/docker \
&& toolbox cp /usr/share/bash-completion /media/root/var/ -R \
&& source /var/bash-completion/bash_completion
$ cp $(readlink .bashrc) .bashrc.new && mv .bashrc.new .bashrc
$ echo "source /var/bash-completion/bash_completion" >> ~/.bashrc
docker-compose用補完ファイル
$ sudo -i
# curl -L https://raw.githubusercontent.com/docker/compose/1.4.2/contrib/completion/bash/docker-compose > /var/bash-completion/completions/docker-compose
CoreOSにはパッケージマネージャがない代わりのような立ち位置にtoolboxが付属してます。
タブしてみる
$ docker-compose
build kill migrate-to-labels ps restart run start up
help logs port pull rm scale stop version
おー。補完されました。