1
0
mirror of https://github.com/Adam-Ant/DroneAgentBuilder synced 2024-11-05 08:46:23 +00:00
DroneAgentBuilder/builder_commands

38 lines
1000 B
Plaintext
Raw Normal View History

2018-02-06 01:36:23 +00:00
# Enable the community repo
edit /etc/apk/repositories:'s/^#\(.*community\)/\1/g'
# Setup the new MOTD
run motd.sh
# Disallow root login
root-password disabled
edit /etc/ssh/sshd_config:'/^PermitRootLogin yes/d'
# Set up the docker user
update
install docker
install sudo
install shadow
run-command adduser -D -G docker docker
run-command { echo changeme; echo changeme; } | passwd docker
run-command echo changeme | chage -d 0 docker
run-command echo 'docker ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/docker-nopasswd
chmod 0640:/etc/sudoers.d/*
# Install docker
install docker
run-command rc-update add docker boot
run-command service docker start
# Install docker-compose
install python
install py-pip
run-command pip install docker-compose
uninstall py-pip
# Set up pruning docker every 15 minutes. Useful for build agents
run-command rc-update add crond
run-command echo '*/15 * * * * docker system prune -a -f --filter until=10m' | crontab -u docker -
# Install the drone-agent starters