Closed KeithP closed 3 months ago
Hi @KeithP - it looks like the sample hook is not executable. I've a fix for that in https://github.com/basecamp/kamal/pull/757, but you can run chmod +x .kamal/hooks/docker-setup
now to change the permissions on your copy.
Looking forward to using Add docker-setup hook
585 but I'm getting a permission denied error when running this with kamal setup:
‘Running the docker-setup hook... INFO [dd3eb58e] Running /usr/bin/env .kamal/hooks/docker-setup as keithp@localhost DEBUG [dd3eb58e] Command: ( export KAMAL_RECORDED_AT="2024-04-03T09:28:08Z" KAMAL_PERFORMER="keithp" KAMAL_DESTINATION="kamal2" KAMAL_VERSION="f241377d9a5f2a1e37bb3fc36846fd704f32fd42_uncommitted_ab5d7d5ffc954f09" KAMAL_SERVICE_VERSION="blog@f241377d9a5f2a1e37bb3fc36846fd704f32fd42_uncommitted_ab5d7d5ffc954f09" KAMAL_HOSTS="xx.xx.xx.xxx" KAMAL_COMMAND="setup" ; /usr/bin/env .kamal/hooks/docker-setup ) DEBUG [dd3eb58e] /usr/bin/env: ‘.kamal/hooks/docker-setup’: Permission denied Releasing the deploy lock... Finished all in 1.6 seconds [31mERROR (Kamal::Cli::HookError): Hook
docker-setupfailed[0m
.Here is the .kamal/hooks/docker-setup file:
#!/bin/sh echo "Docker set up!"
Handy that it stops here so I can run in the changes by hand but would be beautiful to have it run as intended.
Another hook, post-deploy, runs just fine