docs.rs
docs.rs copied to clipboard
Build in custom docker image
Please consider nginx crate docs: https://docs.rs/nginx/0.4.0/nginx/
as you can see it is not built because the crate needs some modification in the OS:
sed -i 's:# define IPPORT_RESERVED:// #define IPPORT_RESERVED:' /usr/include/netdb.h
Is it possible to provide a custom docker image to build docs for such crates?
Not yet, but a migration to Docker is planned for the "docs.rs 2.0" effort. Perhaps it wouldn't be too much extra effort to allow people to provide a custom image base instead of whatever default we plan to use?
Rustwide allows custom docker images, I wonder if we could allow that to be configured in package.metadata.docs.rs.
That's not going to work: rustwide currently needs some file inside the Docker image to work (currently only the entrypoint iirc). We'd need to change rustwide to instead bundle the entrypoint in itself and mount it inside the container at startup.
Blocked on https://github.com/rust-lang/rustwide/pull/32