Merge pull request #163 from thaJeztah/18.09_backport_busyboxstage2

[18.09 backport] Windows: Bump busybox to v1.1
Upstream-commit: 8c91e9672cc8ab2a7f94ed38932a13fe1298d3fb
Component: engine
This commit is contained in:
Andrew Hsu
2019-02-25 16:29:56 -08:00
committed by GitHub
2 changed files with 4 additions and 13 deletions

View File

@ -776,9 +776,9 @@ Try {
# This is a temporary hack for nanoserver
if ($env:WINDOWS_BASE_IMAGE -ne "microsoft/windowsservercore") {
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 {
$(& "$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"
if (-not($LastExitCode -eq 0)) {

View File

@ -3331,9 +3331,6 @@ func (s *DockerSuite) TestBuildVerifySingleQuoteFails(c *check.C) {
// it should barf on it.
name := "testbuildsinglequotefails"
expectedExitCode := 2
if testEnv.OSType == "windows" {
expectedExitCode = 127
}
buildImageSuccessfully(c, name, build.WithDockerfile(`FROM busybox
CMD [ '/bin/sh', '-c', 'echo hi' ]`))
@ -6052,13 +6049,7 @@ FROM busybox
WORKDIR /foo/bar
`))
out, _ := dockerCmd(c, "inspect", "--format", "{{ json .Config.Cmd }}", image)
// The Windows busybox image has a blank `cmd`
lookingFor := `["sh"]`
if testEnv.OSType == "windows" {
lookingFor = "null"
}
c.Assert(strings.TrimSpace(out), checker.Equals, lookingFor)
c.Assert(strings.TrimSpace(out), checker.Equals, `["sh"]`)
image = "testworkdirlabelimagecmd"
buildImageSuccessfully(c, image, build.WithDockerfile(`
@ -6068,7 +6059,7 @@ LABEL a=b
`))
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