digitalocean / marketplace-partners

Image validation, automation, and other tools for DigitalOcean Marketplace Vendors and Custom Image users
Other
194 stars 98 forks source link

How I fixed my 1-Click Packer build #184

Open Cristy94 opened 5 months ago

Cristy94 commented 5 months ago

I am working on my 1-Click App, and I spent 1 week trying to make, using Packer, an image that actually works.

I am deploying from Windows, and I had to fix multiple issues from the current template/guide.

Those were the fixes I had to debug and implement:

Cristy94 commented 5 months ago

Oh, and the MOTD IP retrieval was wrong. The hostname command used in the template just returns 127.0.0.1

I wrote this instead in 99-one-click: myip=$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1 | head -n 1)