Fortunately, a lot of oil use is recreational. Look at the USA, which uses 10 times the oil per capita as heavily industrialized China.
When oil does start running short, there will be huge price shocks. Either market driven, or war-style command economies will curtail most shipping; while manufacturers pump out electrical vehicles and wind generators as fast as they can (wind generators can be built in factories and set up fairly quickly; nuclear plants require a long lead time due to site construction, planning, etc). Energy production is a relatively small part of the economy, so cutting back on the rest of the economy can pay for alternative energy supplies.
Planes can run on bio-fuel (which costs a fortune, but nobody needs to fly), cars can run on stationary energy (if you convert them to use electric motors). I don't know what container ships can use, perhaps rail will replace them in many cases (though this will be a big disruption).
It won't be pretty. There may be severe shortages. But at least the technology is being developed now.