Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrearug/28a9d956eb067dc936146edfd92eb6b7 to your computer and use it in GitHub Desktop.
Save andrearug/28a9d956eb067dc936146edfd92eb6b7 to your computer and use it in GitHub Desktop.
coreos cloud-config static ip address with docker remote API
#cloud-config
ssh_authorized_keys:
- ssh-rsa AAAA.... you@example.com
coreos:
units:
- name: docker-tcp.socket
command: start
enable: yes
content: |
[Unit]
Description=Docker Socket for the API
[Socket]
ListenStream=2375
BindIPv6Only=both
Service=docker.service
[Install]
WantedBy=sockets.target
- name: enable-docker-tcp.service
command: start
content: |
[Unit]
Description=Enable the Docker Socket for the API
[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl enable docker-tcp.socket
- name: static.network
runtime: true
content: |
[Match]
Name=eno167*
[Network]
DNS=192.168.51.2
Address=192.168.51.100/24
Gateway=192.168.51.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment