Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build from 'builder.dockerfile' if exists #43

Merged
merged 1 commit into from
Dec 11, 2023
Merged

Conversation

fwilhe
Copy link
Member

@fwilhe fwilhe commented Dec 4, 2023

This change allows to track the used Builder tag in a Dockerfile. This is useful for using Dependabot to keep the builder version up to date.

Users of the Builder who wish to use Dependabot will need to create a builder.dockerfile next to their build script with the following contents:

FROM ghcr.io/gardenlinux/builder:SHA

Where SHA will be updated by dependabot if configured correctly.

also users will need to set the container_image value in build to localhost/builder

This change allows to track the used Builder tag in a Dockerfile.
This is useful for using Dependabot to keep the builder version up to date.
@fwilhe
Copy link
Member Author

fwilhe commented Dec 4, 2023

I know it looks weird that I don't have quotes in $containerfile but as far as I understand word splitting is what we want here..

@Vincinator
Copy link
Contributor

Vincinator commented Dec 5, 2023

Could we add documentation? Could be a chapter in docs/getting_started.md or a new file in docs/
For example:

## Updating Builder Tag in Dockerfile with Dependabot

### Purpose
Enable Dependabot to automatically update the Builder tag in Dockerfiles.

### Steps

1. **Create `builder.dockerfile`**:
   - Place next to your `build` script.
   - Add the content: `FROM ghcr.io/gardenlinux/builder:SHA`.
   - `SHA` is the Builder version, updated by Dependabot.

2. **Configure `build` Script**:
   - Set `container_image` to `localhost/builder`.

### Dependabot Setup
Ensure Dependabot monitors `builder.dockerfile` for automatic Builder version updates.

@fwilhe
Copy link
Member Author

fwilhe commented Dec 5, 2023

Could we add documentation?

Yes. I'm not sure if we are there yet because (as far as I understand) Dependabot needs releases on github to actually detect new versions, so we will need to push releases of the builder which we don't do yet. My approach here was to implement the requirements 1 by 1 and document it once we can verify it works.

To my understanding what is missing for this is merging this PR, and push proper tags/releases in this repo which I'd to in another PR (have not yet looked into how the images are published in detail).

@fwilhe fwilhe merged commit 4a395ca into main Dec 11, 2023
2 checks passed
@fwilhe fwilhe deleted the builder-dockerfile branch December 11, 2023 14:13
fwilhe added a commit to gardenlinux/gardenlinux that referenced this pull request Dec 11, 2023
fwilhe added a commit that referenced this pull request Aug 14, 2024
fwilhe added a commit that referenced this pull request Aug 15, 2024
Simplify the build by removing the dockerfile indirection.
This was intended to be used with dependabot but never really worked with how the builder image is published, so we can just remove it to simplify.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants