Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update init_host_server to support updating docker not only for CoreOS #134

Open
mookjp opened this issue Jan 19, 2015 · 0 comments
Open

Comments

@mookjp
Copy link
Owner

mookjp commented Jan 19, 2015

https://github.com/mookjp/pool/blob/master/scripts/init_host_server#L38-L53

if [[ -f /etc/os-release ]] && [[ $(cat /etc/os-release | grep "NAME=CoreOS") ]]; then
    echo "CoreOS detected. Updating to latest docker.."
    systemctl stop docker
    wget -q https://get.docker.com/builds/Linux/x86_64/docker-latest -O ${POOL_BIN_PATH}/docker
    chmod +x ${POOL_BIN_PATH}/docker
    cat << EOF > /etc/systemd/system/docker.service 
.include /usr/lib/systemd/system/docker.service

[Service]
ExecStart=
ExecStart=${POOL_BIN_PATH}/docker -d
EOF
    systemctl daemon-reload
    systemctl enable docker
    systemctl start docker
fi

It can be revised not to restrict to CoreOS but to support all hosts which has systemd.
ref: #133

ainoya added a commit that referenced this issue Jan 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant