Skip to content

Instantly share code, notes, and snippets.

@derekmerck
Forked from heri16/user-data.txt
Last active April 6, 2021 20:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save derekmerck/7b55c34c91954e84aa155e487ffe2e8d to your computer and use it in GitHub Desktop.
Save derekmerck/7b55c34c91954e84aa155e487ffe2e8d to your computer and use it in GitHub Desktop.
Docker-CE cloud-init for Debian-based
#cloud-config
package_upgrade: true
packages: ['docker-ce', 'docker-compose']
apt:
preserve_sources_list: true
sources:
docker.list:
source: "deb [arch=amd64] https://download.docker.com/linux/debian $RELEASE edge"
keyid: 0EBFCD88
runcmd:
- [ systemctl, start, --no-block, docker ]
@derekmerck
Copy link
Author

derekmerck commented Oct 30, 2018

Todo for Packet

  • Update docker-compose:

    curl -L https://github.com/docker/compose/releases/download/1.23.0-rc3/docker-compose-`uname -s`-`uname -m` -o /usr/bin/docker-compose
    chmod +x /usr/bin/docker-compose
    
  • Bind elastic IP?
    ip addr add 147.75.255.255 dev lo
    see https://help.packet.net/article/54-elastic-ips

  • Bind volume mounted data?

    wget -O /usr/bin/packet-block-storage-attach https://raw.githubusercontent.com/packethost/packet-block-storage/master/packet-block-storage-attach
    wget -O /usr/bin/packet-block-storage-detach https://raw.githubusercontent.com/packethost/packet-block-storage/master/packet-block-storage-detach
    chmod u+x /usr/bin/packet-block-storage-*
    packet-block-storage-attach -m queue
    

    See https://help.packet.net/article/63-elastic-block-storage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment