You can create your own proprietary OS and never even sell it or use in your machines... It's yours and unless you authorize, others can't distribute it.
For Docker to decide to remove the image from their website? Obviously not.
Docker runs the service and can do whatever they want.
If Apple sends a cease and desist, and Docker decides they'd rather take it down than risk going to court with Apple /to determine if there were damages/ - then they're free to do so.
that's very important to point out yes! it's not like apple software products are covered by copyright law after all. it's the big bad lawyers that's ruling the day here.