Cloud Foundry Error: negative offset

DevOps

MOTOSHARE 🚗🏍️
Turning Idle Vehicles into Shared Rides & Earnings

From Idle to Income. From Parked to Purpose.
Earn by Sharing, Ride by Renting.
Where Owners Earn, Riders Move.
Owners Earn. Riders Move. Motoshare Connects.

With Motoshare, every parked vehicle finds a purpose. Owners earn. Renters ride.
🚀 Everyone wins.

Start Your Journey with Motoshare

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)