mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #38278 from Microsoft/jjh/busyboxstage2
Windows: busybox to v1.1, update tests accordingly
This commit is contained in:
commit
2555344858
2 changed files with 4 additions and 13 deletions
|
@ -776,9 +776,9 @@ Try {
|
||||||
# This is a temporary hack for nanoserver
|
# This is a temporary hack for nanoserver
|
||||||
if ($env:WINDOWS_BASE_IMAGE -ne "microsoft/windowsservercore") {
|
if ($env:WINDOWS_BASE_IMAGE -ne "microsoft/windowsservercore") {
|
||||||
Write-Host -ForegroundColor Red "HACK HACK HACK - Building 64-bit nanoserver busybox image"
|
Write-Host -ForegroundColor Red "HACK HACK HACK - Building 64-bit nanoserver busybox image"
|
||||||
$(& "$env:TEMP\binary\docker-$COMMITHASH" "-H=$($DASHH_CUT)" build -t busybox https://raw.githubusercontent.com/jhowardmsft/busybox64/v1.0/Dockerfile | Out-Host)
|
$(& "$env:TEMP\binary\docker-$COMMITHASH" "-H=$($DASHH_CUT)" build -t busybox https://raw.githubusercontent.com/jhowardmsft/busybox64/v1.1/Dockerfile | Out-Host)
|
||||||
} else {
|
} else {
|
||||||
$(& "$env:TEMP\binary\docker-$COMMITHASH" "-H=$($DASHH_CUT)" build -t busybox https://raw.githubusercontent.com/jhowardmsft/busybox/v1.0/Dockerfile | Out-Host)
|
$(& "$env:TEMP\binary\docker-$COMMITHASH" "-H=$($DASHH_CUT)" build -t busybox https://raw.githubusercontent.com/jhowardmsft/busybox/v1.1/Dockerfile | Out-Host)
|
||||||
}
|
}
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
if (-not($LastExitCode -eq 0)) {
|
if (-not($LastExitCode -eq 0)) {
|
||||||
|
|
|
@ -3332,9 +3332,6 @@ func (s *DockerSuite) TestBuildVerifySingleQuoteFails(c *check.C) {
|
||||||
// it should barf on it.
|
// it should barf on it.
|
||||||
name := "testbuildsinglequotefails"
|
name := "testbuildsinglequotefails"
|
||||||
expectedExitCode := 2
|
expectedExitCode := 2
|
||||||
if testEnv.OSType == "windows" {
|
|
||||||
expectedExitCode = 127
|
|
||||||
}
|
|
||||||
|
|
||||||
buildImageSuccessfully(c, name, build.WithDockerfile(`FROM busybox
|
buildImageSuccessfully(c, name, build.WithDockerfile(`FROM busybox
|
||||||
CMD [ '/bin/sh', '-c', 'echo hi' ]`))
|
CMD [ '/bin/sh', '-c', 'echo hi' ]`))
|
||||||
|
@ -6058,13 +6055,7 @@ FROM busybox
|
||||||
WORKDIR /foo/bar
|
WORKDIR /foo/bar
|
||||||
`))
|
`))
|
||||||
out, _ := dockerCmd(c, "inspect", "--format", "{{ json .Config.Cmd }}", image)
|
out, _ := dockerCmd(c, "inspect", "--format", "{{ json .Config.Cmd }}", image)
|
||||||
|
c.Assert(strings.TrimSpace(out), checker.Equals, `["sh"]`)
|
||||||
// The Windows busybox image has a blank `cmd`
|
|
||||||
lookingFor := `["sh"]`
|
|
||||||
if testEnv.OSType == "windows" {
|
|
||||||
lookingFor = "null"
|
|
||||||
}
|
|
||||||
c.Assert(strings.TrimSpace(out), checker.Equals, lookingFor)
|
|
||||||
|
|
||||||
image = "testworkdirlabelimagecmd"
|
image = "testworkdirlabelimagecmd"
|
||||||
buildImageSuccessfully(c, image, build.WithDockerfile(`
|
buildImageSuccessfully(c, image, build.WithDockerfile(`
|
||||||
|
@ -6074,7 +6065,7 @@ LABEL a=b
|
||||||
`))
|
`))
|
||||||
|
|
||||||
out, _ = dockerCmd(c, "inspect", "--format", "{{ json .Config.Cmd }}", image)
|
out, _ = dockerCmd(c, "inspect", "--format", "{{ json .Config.Cmd }}", image)
|
||||||
c.Assert(strings.TrimSpace(out), checker.Equals, lookingFor)
|
c.Assert(strings.TrimSpace(out), checker.Equals, `["sh"]`)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test case for 28902/28909
|
// Test case for 28902/28909
|
||||||
|
|
Loading…
Add table
Reference in a new issue