-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloud-init
More file actions
37 lines (32 loc) · 1.21 KB
/
cloud-init
File metadata and controls
37 lines (32 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
users:
- default
write_files:
- path: /home/ubuntu/setup-podman.sh
content: |
#!/bin/bash
# Set correct permission on own home folder
sudo chown ubuntu:ubuntu .
chmod 755 .
# Install podman
. /etc/os-release
sudo apt update
sudo apt install podman fuse-overlayfs -y
# root mode configuration
#sudo cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/authorized_keys
#sudo systemctl --system enable --now podman.socket
# rootless mode configuration
echo "net.ipv4.ip_unprivileged_port_start=80" | sudo tee -a /etc/sysctl.conf
sudo sysctl --system &> /dev/null
systemctl --user enable --now podman.socket
sudo loginctl enable-linger $USER
# start ssh
sudo systemctl enable --now ssh.service
permissions: "0755"
runcmd:
- sudo cp /etc/skel/.bashrc /home/ubuntu/.bashrc
- sudo cp /etc/skel/.bash_logout /home/ubuntu/.bash_logout
- sudo cp /etc/skel/.profile /home/ubuntu/.profile
- echo "192.168.10.10 docker.for.mac.localhost" | sudo tee -a /etc/cloud/templates/hosts.debian.tmpl
bootcmd:
- printf "[Resolve]\nDNS=1.1.1.1\nFallbackDNS=1.0.0.1" > /etc/systemd/resolved.conf
- [systemctl, restart, systemd-resolved]