Skip to content

Commit 8b73e2b

Browse files
Fix docker:push for fips image
1 parent e2143e9 commit 8b73e2b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

magefile.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,12 +999,17 @@ func (Docker) Image() error {
999999

10001000
// Push pushs an image created by docker:image to the registry.
10011001
// FIPS may be used to push a FIPS capable image.
1002+
// DOCKER_IMAGE may be used to specify the image name.
10021003
// DOCKER_IMAGE_TAG may be used to specify the image tag.
10031004
func (Docker) Push() error {
10041005
image := dockerImage
10051006
if isFIPS() {
10061007
image += "-fips"
10071008
}
1009+
if v, ok := os.LookupEnv(envDockerImage); ok && v != "" {
1010+
image = v
1011+
}
1012+
10081013
version := getVersion()
10091014
if v, ok := os.LookupEnv(envDockerTag); ok && v != "" {
10101015
version = v

0 commit comments

Comments
 (0)