Why can't I get ocaml 4.07.1 in my ubuntu docker container - how to fix?

I’m trying to install a compiler 4.07.1 but I get the error:

bot@06c94b204461:~$ opam switch create coq-8.12 4.07.1


<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ocaml-base-compiler.4.07.1] found in cache
[ERROR] The sources of the following couldn't be obtained, aborting:
          - ocaml-base-compiler.4.07.1

Switch initialisation failed: clean up? ('n' will leave the switch partially installed) [Y/n] Y
bot@06c94b204461:~$
bot@06c94b204461:~$ opam switch create coq-8.12 4.07.1^C
bot@06c94b204461:~$ opam switch
#   switch                                                  compiler                       description
    default                                                 ocaml-base-compiler.4.14.0     default
->  ocaml-variants.4.07.1+flambda_coq-serapi.8.11.0+0.11.1  ocaml-variants.4.07.1+flambda  ocaml-variants.4.07.1+flambda_coq-serapi.8.11.0+0.11.1
bot@06c94b204461:~$

how do I fix this?

Your opam repository has not been updated and doesn’t contain any information about 4.07.1, and you should update it.