Skip to content

Commit 2e3464d

Browse files
author
George Mileka
authored
chore: bump imagecustomizer container version (#498)
Also includes compensating changes to work with latest imagecustomizer containers.
1 parent b0ab2c3 commit 2e3464d

File tree

5 files changed

+9
-18
lines changed

5 files changed

+9
-18
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[tools.imageCustomizer]
2-
containerTag = "mcr.microsoft.com/azurelinux/imagecustomizer:0.18.0"
2+
containerTag = "mcr.microsoft.com/azurelinux/imagecustomizer:1"

internal/app/azldev/cmds/image/imageutils.go

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ const (
2525
// of the log level set for azldev.
2626
// The log level set for azldev controls what is shown on the console.
2727
defaultLogLevel = "debug"
28-
29-
entryPointSwitch = "--entrypoint"
30-
downloadAndCustomizeScriptPath = "/usr/local/bin/run.sh"
3128
)
3229

3330
type imageCustomizerOptions struct {
@@ -81,12 +78,6 @@ func buildDockerArgs(
8178
if options.imageFile != "" {
8279
inputImageDir := path.Dir(options.imageFile)
8380
args = append(args, "-v", inputImageDir+":"+inputImageDir+docker.MountROOption)
84-
} else if options.imageTag != "" {
85-
// To be able to use the image tag, we need to set the entry point to
86-
// the script that will download the image first and then run the
87-
// Image Customizer after that. This overrides the default entry point
88-
// which calls the Image Customizer directly.
89-
args = append(args, entryPointSwitch, downloadAndCustomizeScriptPath)
9081
}
9182

9283
return args
@@ -127,16 +118,13 @@ func buildImageCustomizerArgs(
127118
) []string {
128119
args := []string{}
129120

130-
if options.imageTag != "" {
131-
// /usr/local/bin/run.sh expects the first argument to be the image tag.
132-
// It then passes the rest to the image customizer binary as before.
133-
args = append(args, options.imageTag)
134-
}
135-
136121
args = append(args, imageCustomizerCommand)
137122

138123
if options.imageFile != "" {
139124
args = append(args, "--image-file", options.imageFile)
125+
} else if options.imageTag != "" {
126+
args = append(args, "--image", "azurelinux:minimal-os:"+options.imageTag)
127+
args = append(args, "--image-cache-dir", "/azldev/image-cache")
140128
}
141129

142130
args = append(args, []string{

scenario/image_customize_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
)
1919

2020
const (
21-
minimalOS30ImageTag = "3.0.latest"
21+
minimalOS30ImageTag = "3.0"
2222
commonTestDataDir = "scenario/testdata/imagecustomizer"
2323
)
2424

scenario/testdata/imagecustomizer/e2e/azldev-config/azldev.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ work-dir = '/build/work'
77
output-dir = 'out'
88

99
[tools.imageCustomizer]
10-
containerTag = "mcr.microsoft.com/azurelinux/imagecustomizer:0.18.0"
10+
containerTag = "mcr.microsoft.com/azurelinux/imagecustomizer:1"

scenario/testdata/imagecustomizer/e2e/image-config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
previewFeatures:
2+
- input-image-oci
3+
14
os:
25
packages:
36
install:

0 commit comments

Comments
 (0)