From 37c6f0be8ec2a6153ebc049c539bfbe61b282939 Mon Sep 17 00:00:00 2001 From: Gerard Braad Date: Mon, 28 Apr 2025 21:26:56 +0800 Subject: [PATCH 1/2] Remove duplicate entry --- content/SUMMARY.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/SUMMARY.md b/content/SUMMARY.md index 21d60c9..d72b0a7 100644 --- a/content/SUMMARY.md +++ b/content/SUMMARY.md @@ -14,7 +14,6 @@ CRC Engineering docs - [macOS code signing](macOS-code-signing.md) - [Windows installation process](Windows-installation.md) - [Networking]() - - [Track TCP proxy connections](Using-tcpconnect-to-track-TCP-proxy-connections.md) - [User-mode network stack](Usermode-networking-stack.md) - [Blocking traffic with nwfilter](Blocking-traffic-with-nwfilter.md) - [Using tcpconnect to track TCP proxy connections](Using-tcpconnect-to-track-TCP-proxy-connections.md) From f00eb5e122c010d57fcd87fb51e65a34a15a0eb8 Mon Sep 17 00:00:00 2001 From: Gerard Braad Date: Mon, 28 Apr 2025 21:27:22 +0800 Subject: [PATCH 2/2] Update mdbook version and automate container build --- .devcontainer/Containerfile | 2 +- .github/workflows/container.yml | 27 +++++++++++++++++++++++++++ README.md | 4 ++-- containers/Containerfile | 8 ++++---- 4 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/container.yml diff --git a/.devcontainer/Containerfile b/.devcontainer/Containerfile index fb429ee..0e7b820 100644 --- a/.devcontainer/Containerfile +++ b/.devcontainer/Containerfile @@ -1,4 +1,4 @@ -FROM quay.io/crc-org/mdbook:0.4.43 +FROM ghcr.io/crc-org/mdbook:latest RUN dnf install -y git-core \ && dnf clean all \ diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml new file mode 100644 index 0000000..b8a250d --- /dev/null +++ b/.github/workflows/container.yml @@ -0,0 +1,27 @@ +name: Build Container + +on: + workflow_dispatch: + +jobs: + build: + name: Build Container + runs-on: 'ubuntu-latest' + + steps: + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Build container + run: | + podman build -t ghcr.io/${{ github.repository_owner }}/mdbook:latest \ + -f containers/Containerfile + + - name: Login to container registry + run: | + podman login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} + + - name: Push to registry + run: | + podman push ghcr.io/${{ github.repository_owner }}/mdbook:latest + diff --git a/README.md b/README.md index d83c864..593a5da 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ For example, it is easy to use `.` to start the GitHub Web Editor to read and ed To create the HTML output, you can use: ``` -$ podman run --rm -v $PWD:/workspace quay.io/crc-org/mdbook:0.4.43 build +$ podman run --rm -v $PWD:/workspace ghcr.io/crc-org/mdbook:latest build ``` This will create a `book` folder that contains the output for a static webpage like GitHub Pages. @@ -41,4 +41,4 @@ $ npm install -g @devcontainers/cli $ devcontainer up --workspace-folder . ``` -After the container has been started, you can use `mdbook build` to generate the output, and `mdbook serve` to open a preview using the forward of port 3000. \ No newline at end of file +After the container has been started, you can use `mdbook build` to generate the output, and `mdbook serve` to open a preview using the forward of port 3000. diff --git a/containers/Containerfile b/containers/Containerfile index d6cf5f9..59c2f53 100644 --- a/containers/Containerfile +++ b/containers/Containerfile @@ -1,14 +1,14 @@ -FROM registry.fedoraproject.org/fedora:40 AS builder +FROM registry.access.redhat.com/ubi9:latest AS builder RUN dnf install -y cargo openssl-devel \ - && cargo install mdbook \ + && cargo install mdbook --locked \ && cargo install mdbook-callouts \ && cargo install mdbook-mermaid \ - && cargo install mdbook-kroki-preprocessor + && cargo install mdbook-kroki-preprocessor --locked -FROM registry.fedoraproject.org/fedora:40 +FROM registry.access.redhat.com/ubi9:latest COPY --from=builder /root/.cargo/bin/mdbook /usr/bin COPY --from=builder /root/.cargo/bin/mdbook-callouts /usr/bin