metal3-io / metal3-docs

Architecture documentation that describes the components being built under Metal³.
http://metal3.io
Apache License 2.0
263 stars 111 forks source link

Add docker-build target #425

Closed lentzi90 closed 1 month ago

lentzi90 commented 1 month ago

This adds a docker-build make target for building the container image. The Dockerfile is also expanded to build the releasetags preprocessor in a build container instead of copying from the host.

The mdbook version is taken from the Makfile as an argument. The rust version is bumped since the old version could not build the newer mdbook version. (The versions in the Dockerfile and Makefile were different.)

lentzi90 commented 1 month ago

It seems like we have not published a new container image for this in ~2 years. How about we just always build it locally? I don't see much need for publishing this image and if we always build locally there is one less thing to worry about. The build and serve make targets already depend on the image so it would be trivial to make them depend on building the image also, instead of pulling it.

lentzi90 commented 1 month ago

/cc @peppi-lotta

peppi-lotta commented 1 month ago

Excellent change in my opinion! Works great.

/lgtm

metal3-io-bot commented 1 month ago

@peppi-lotta: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to [this](https://github.com/metal3-io/metal3-docs/pull/425#issuecomment-2104365258): >Excellent change in my opinion! Works great. > >/lgtm Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
tuminoid commented 1 month ago

It doesn't seem to work unless built with make docker-build that feeds the mdbook version. Can we have sensible default for that, so it works if you just docker build ... it?

lentzi90 commented 1 month ago

Sure I can add some default version!

lentzi90 commented 1 month ago

/cc @kashifest @dtantsur

metal3-io-bot commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kashifest

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/metal3-io/metal3-docs/blob/main/OWNERS)~~ [kashifest] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment