Cloud Foundry Error: negative offset
Limited Time Offer!
For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!
Error
root@ubuntu:~# cf push first-push -p summit-hands-on-labs/basel-2018/first-push/first-push-app.jar -b java_buildpack --random-route
Pushing app first-push to org test-org / space test-space as admin...
readat /root/summit-hands-on-labs/basel-2018/first-push/first-push-app.jar: negative offset
FAILED
Solution
The cf cli supports either a ZIP archive or a folder as the path argument to cf push -p. It doesn't support tgz.
From cf push -h:
Path to app directory or to a zip file of the contents of the app directory
If you can bundle your app as a .zip, what you're trying should just work.
cf push first-push -p summit-hands-on-labs/basel-2018/first-push/first-push-app -b java_buildpack --random-route