This is happens every time I try to install Java on the official Debian stretch-slim or testing-slim docker image. This is a blocker for moving the F-Droid infrastructure to stretch.
Apparently, it works with the "testing" image, i.e. not "slim": https://gitlab.com/eighthave/ci-images-base/builds/17325240 Seems like that means that the dependencies are not correctly specified then.