VSTS build pipeline how to share output of a docker task?

I have a sample pipeline with a docker task where my Dockerfile executes a shell script that generates some data.

When I finally run my image how do I share output of my script from inside of the container with the next task or make it somehow available or pass further?

Source: StackOverflow