Skip to content

build(deploy): use checked-out source in urunc-deploy image - #1102

Open
Inuth0603 wants to merge 1 commit into
urunc-dev:mainfrom
Inuth0603:fix/use-checked-out-source-in-urunc-deploy
Open

Inuth0603 wants to merge 1 commit into
urunc-dev:mainfrom
Inuth0603:fix/use-checked-out-source-in-urunc-deploy

Conversation

@Inuth0603

Copy link
Copy Markdown

Update the urunc-deploy Docker build to use the source checked out by CI instead of cloning the repository during the build.

Changes

  • Use COPY . . in the Dockerfile and update file paths for the repository root build context.
  • Set the build context to the repository root in build-latest.yml.
  • Update the Dockerfile path and remove the unused REPO and BRANCH build arguments.
  • Add contributor entry to .github/contributors.yaml and update spellcheck dictionary.

Related issues

How was this tested?

  • Checked Dockerfile paths and build context relative to repo root.
  • Reviewed workflow changes and build parameters.
  • End-to-end verification will be handled by CI.

LLM usage

Google Gemini (via Antigravity) assisted with identifying file paths, formatting, and preparing the patch. All changes were reviewed by the contributor.

Checklist

  • I have read the contribution guide.
  • The linter passes locally (make lint).
  • The e2e tests of at least one tool pass locally (make test_ctr, make test_nerdctl, make test_docker, make test_crictl).
  • If LLMs were used: I have read the llm policy.

@netlify

netlify Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for urunc ready!

Name Link
🔨 Latest commit a551777
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6adb9543397d621ebb258424
😎 Deploy Preview https://deploy-preview-1102--urunc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@cmainas cmainas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @Inuth0603 ,

thank you for the fix. We should also add a .dockerignore file. However, do not ignore .git, since it is needed for the version of urunc. Some files and directories to ignore:

  • vendor
  • dist
  • docs
  • .github
  • tests
    and other non-build files in the top directory.

At last, there are some conflicts with .github/linters/urunc-dict.txt

@Inuth0603
Inuth0603 force-pushed the fix/use-checked-out-source-in-urunc-deploy branch from 8d9b0c9 to 108c6ac Compare October 20, 2026 19:15
@Inuth0603

Copy link
Copy Markdown
Author

Hi @cmainas, thanks for the review. I've added the .dockerignore with the required exclusions while keeping .git for git describe. I also rebased onto urunc-dev:main and resolved the conflict in urunc-dict.txt, adding Divyam and Agarwal alphabetically and keeping fuzztime from upstream.

Let me know if anything else needs fixing.

@cmainas cmainas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Inuth0603 for the changes. However, my suggestion about the ignore files was wrong and when I used the dockerifle to build urunc I got a -dirty suffix in the version.

So some more changes are needed:

  • tests/ directory should not get ignored because the go.mod file changes.
  • We should use build-args for the commit sha. So in the action we need to calculate the first 7 characters form the commit sha and then pass it as build-args somehting like

``
build-args: |
COMMIT=${GITHUB_SHA::7}

Comment thread .dockerignore Outdated
Comment on lines +6 to +9
!/deployment/urunc-deploy
!/deployment/urunc-deploy/config.toml
!/deployment/urunc-deploy/scripts
!/deployment/urunc-deploy/scripts/install.sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason for these directories if we include /deployment.

@Inuth0603
Inuth0603 force-pushed the fix/use-checked-out-source-in-urunc-deploy branch from e4ba1a8 to 7d883ba Compare October 21, 2026 18:58
@Inuth0603

Copy link
Copy Markdown
Author

Hi @cmainas, thanks for the follow-up review. I've addressed the feedback and rebased onto urunc-dev:main.

  • Simplified .dockerignore by removing the four redundant entries covered by !/deployment.
  • Changed COMMIT := to COMMIT ?= in the Makefile, added the COMMIT build arg to the Dockerfile, and updated the workflow to pass github.sha so the build doesn't get the -dirty suffix.
  • Rebased onto upstream/main, picked up the Go 1.27.2 bump, and resolved the urunc-dict.txt conflict, keeping the upstream entries alongside Inuth.

Let me know if anything else needs fixing.

@cmainas cmainas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @Inuth0603 ,

please sign your commits and the new changes have introduced some new issues.

Comment thread Makefile Outdated

# Versioning variables
COMMIT := $(shell git describe --dirty --long --always)
COMMIT ?= $(shell git describe --dirty --long --always)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should keep :=. Now outside of the action a docker build without a build-args becomes an empty string for the commit sha in the version.

Comment thread .github/workflows/build-latest.yml Outdated
REPO=${{ github.repository }}
provenance: false
build-args: |
COMMIT=${{ github.sha }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just need the first 7 characters, not the entire sha.

@Inuth0603
Inuth0603 force-pushed the fix/use-checked-out-source-in-urunc-deploy branch from 7d883ba to 9c05d12 Compare October 22, 2026 14:20
@Inuth0603

Copy link
Copy Markdown
Author

Hi @cmainas, thanks for the review. I've made the changes and force-pushed the updates.

  • Kept := in the Makefile and changed the Dockerfile to use RUN make COMMIT=${COMMIT} so the build arg overrides it.
  • Added a step to extract the first 7 characters of GITHUB_SHA and pass them as the COMMIT build arg.
  • Added Signed-off-by trailers to all 4 commits.

@cmainas cmainas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Inuth0603 for the updates. Please squash your commits

@Inuth0603
Inuth0603 force-pushed the fix/use-checked-out-source-in-urunc-deploy branch 2 times, most recently from 41d5c76 to 684e636 Compare October 23, 2026 17:08
Update the urunc-deploy Docker build to use the source checked out by CI
instead of cloning the repository during the build.

- Use COPY . . in the Dockerfile and set build context to repo root
- Remove unused REPO and BRANCH build args; add COMMIT build arg
- Extract first 7 chars of GITHUB_SHA in workflow and pass as build arg
- Add .dockerignore to limit build context (exclude vendor, dist, docs, etc.)
- Keep COMMIT := in Makefile; override via RUN make COMMIT=${COMMIT} in Dockerfile
- Add contributor entry to .github/contributors.yaml
- Update spellcheck dictionary

Fixes urunc-dev#1096

Signed-off-by: Divyam Agarwal <iitdivyamagarwal@gmail.com>
@Inuth0603
Inuth0603 force-pushed the fix/use-checked-out-source-in-urunc-deploy branch from 684e636 to a551777 Compare October 23, 2026 17:11
@Inuth0603

Copy link
Copy Markdown
Author

Hi @cmainas, sorry for the multiple force-pushes. I had to fix the DCO sign-off and rebase onto the latest main to resolve the conflict in .github/contributors.yaml. The branch is now squashed into a single commit, the sign-off is fixed, and both contributors' entries are preserved.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

urunc-deploy image building clones the urunc repository

2 participants