Running maturin build in docker image fails with error

When I try to build Python modules using pyo3 with the docker image it fails with the error below.
I'm using Kubuntu Linux, Rust nightly, and pyo3 0.12.3.

Command line:

docker run --rm -v $(pwd):/io konstin2/maturin build

Output:

šŸ’„ maturin failed
  Caused by: Cargo metadata failed. Do you have cargo in your PATH?
  Caused by: Error during execution of `cargo metadata`: error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names -Z mutable-noalias --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
  --- stderr
  error: the option `Z` is only accepted on the nightly compiler