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:
- Add rm -rf /opt/digitalocean to 90-cleanup.sh
- Use ubuntu-20-04 because with ubuntu-22-04 packer fails SSH connection
- Fix CRLF/LF newline issues. I wrote my scripts and ran packer on Windows, when uploading the newline characters where wrong. I had to make sure all scripts/files have the right LF line endings.
- Fix file permissions. The 001_onboot and 99-one-click MOTD scripts were not executed, because files copied by packer don't have execute permissions.
I have added this to marketplace-image.json, after the files are copied:
{
"type": "shell",
"inline": [
"chmod +x /var/lib/cloud/scripts/per-instance/001_onboot",
"chmod +x /etc/update-motd.d/99-one-click"
]
},
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:
I have added this to marketplace-image.json, after the files are copied: