fix(build): move ARG declaration after FROM in Dockerfile#4772
Merged
Conversation
Moved the BINARY ARG declaration from before the FROM instruction to after it. ARG declarations before FROM are in global scope and cannot be used after FROM unless redeclared, which was causing a Docker build warning about undefined variable usage. This change: - Eliminates the UndefinedVar warning during docker build - Properly scopes the ARG within the build stage - Maintains build-time configurability with the default value Fixes #4584 Signed-off-by: Mark Phelps <[email protected]>
|
Related Documentation Checked 3 published document(s). No updates required. You have 3 draft document(s). Publish docs to keep them always up-to-date |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v2 #4772 +/- ##
==========================================
+ Coverage 58.42% 58.46% +0.04%
==========================================
Files 134 134
Lines 16852 16852
==========================================
+ Hits 9845 9852 +7
+ Misses 6320 6314 -6
+ Partials 687 686 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
erka
approved these changes
Sep 30, 2025
|
Documentation Updates Checked 3 published document(s). No updates required. You have 3 draft document(s). Publish docs to keep them always up-to-date |
ptejasvini
pushed a commit
to ptejasvini/flipt
that referenced
this pull request
Oct 3, 2025
) Moved the BINARY ARG declaration from before the FROM instruction to after it. ARG declarations before FROM are in global scope and cannot be used after FROM unless redeclared, which was causing a Docker build warning about undefined variable usage. This change: - Eliminates the UndefinedVar warning during docker build - Properly scopes the ARG within the build stage - Maintains build-time configurability with the default value Fixes flipt-io#4584 Signed-off-by: Mark Phelps <[email protected]> Signed-off-by: tejasvini1 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes Docker build warning about undefined variable
$BINARYby moving the ARG declaration to after the FROM instruction.Changes
build/Dockerfile: MovedARG BINARY=fliptfrom beforeFROM alpine:3.22.1to after itTechnical Details
ARG declarations before FROM are in global scope and cannot be used after FROM unless redeclared. This was causing the warning:
By moving the ARG declaration after FROM, it's properly scoped within the build stage and available for use in the COPY instruction.
Fixes #4584