The script runs as user oozie. User Oozie might not have permissions to run docker operations. Add oozie to the docker group.
oozie
docker