Skip to content

Commit ead349a

Browse files
committed
fix: copy license for mage command
1 parent 8bb1e69 commit ead349a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

magefile.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ func (b Build) Docker() error {
203203
// Target for building Docker image for trivy-operator ubi9
204204
func (b Build) DockerUbi9() error {
205205
fmt.Println("Building Docker image for trivy-operator ubi9...")
206+
if err := sh.RunV("cp", "LICENSE", "./bin/LICENSE"); err != nil {
207+
return fmt.Errorf("Could not copy license file: %v", err)
208+
}
206209
return sh.RunV("docker", "build", "--no-cache", "-f", "build/trivy-operator/Dockerfile.ubi9", "-t", TRIVY_OPERATOR_IMAGE_UBI9, "bin")
207210
}
208211

0 commit comments

Comments
 (0)