Cloud Foundry Error: negative offset

DevOps

YOUR COSMETIC CARE STARTS HERE

Find the Best Cosmetic Hospitals

Trusted • Curated • Easy

Looking for the right place for a cosmetic procedure? Explore top cosmetic hospitals in one place and choose with confidence.

“Small steps lead to big changes — today is a perfect day to begin.”

Explore Cosmetic Hospitals Compare hospitals, services & options quickly.

✓ Shortlist providers • ✓ Review options • ✓ Take the next step with confidence

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
FAILEDCode language: PHP (php)

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
Code language: PHP (php)