doodle icon indicating copy to clipboard operation
doodle copied to clipboard

No matching manifest for windows

Open makutamatey opened this issue 6 years ago • 6 comments

When I build the code I cloned from this repo, I get this error: 1.11-alpine: Pulling from library/golang no matching manifest for windows/amd64 10.0.17134 in the manifest list entries.

I don't seem to find any solution. Kindly help me. I am running docker for windows

makutamatey avatar Aug 08 '19 10:08 makutamatey

@makutamatey I'm wondering if that was a transient error? I will take a look, but unfortunately it will have to be in a week when I have access to a Windows machine.

pdevine avatar Aug 11 '19 22:08 pdevine

@makutamatey just had a chance to look at this. The problem is due to the -alpine part of the tag which unfortunately there is no alpine linux container which will run on Windows. You can change the Dockerfile to use golang:1.11 instead and it will build correctly. I'll look at creating a new Dockerfile that fixes this, but need to sort a few things out still.

pdevine avatar Aug 20 '19 21:08 pdevine

Hi,

I removed the -alpine in both files. Now I get this: Sending build context to Docker daemon 12.8kB

Step 1/9 : FROM golang:1.11 AS builder ---> 92d583cdd84d Step 2/9 : RUN apk add --no-cache git ---> Running in ca3c5c322adc [91mapk : The term 'apk' is not recognized as the name of a cmdlet, function, [0m[91mscript file, or operable program. Check the spelling of the name, or if a pat h [0m[91mwas included, verify that the path is correct and try again. At line:1 char:76

  • ... rence = 'Stop'; $ProgressPreference = 'SilentlyContinue'; apk add --n ... [0m[91m+ ~~~
    • CategoryInfo : ObjectNotFound: (apk:String) [], ParentContainsE rrorRecordException
    • FullyQualifiedErrorId : CommandNotFoundException

docker : The command 'powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; apk add --no-cache git' returned a non-zero code: 1 At line:1 char:1

  • docker build -t rlzdocker4/cheers2019 .
  •   + CategoryInfo          : NotSpecified: (The command 'po...on-zero code: 1:Strin 
     g) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError
    
    

when doing docker build -t rlzdocker2/cheers2019 . on windows as windows docker. am I missing something?

renaudl avatar Aug 26 '19 12:08 renaudl

Made it work like this as a pure windows dock - probably a bit hackish as I am all new to this:

FROM golang:1.11 AS builder

ENV GIT_VERSION 2.15.1 ENV GIT_PATCH_VERSION 2

RUN powershell -Command $ErrorActionPreference = 'Stop' ;
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ;
Invoke-WebRequest $('https://github.com/git-for-windows/git/releases/download/v{0}.windows.{1}/MinGit-{0}.{1}-busybox-64-bit.zip' -f $env:GIT_VERSION, $env:GIT_PATCH_VERSION) -OutFile 'mingit.zip' -UseBasicParsing ;
Expand-Archive mingit.zip -DestinationPath c:\mingit ;
Remove-Item mingit.zip -Force ;
setx /M PATH $('c:\mingit\cmd;{0}' -f $env:PATH)

RUN go get github.com/pdevine/go-asciisprite WORKDIR /project COPY cheers.go .

ENV CGO_ENABLED 0

RUN go build -a -ldflags '-extldflags "-static"' -o cheers cheers.go

FROM mcr.microsoft.com/windows/nanoserver:1809 AS release-windows COPY --from=builder /project/cheers /cheers.exe ENTRYPOINT ["\cheers.exe"]

renaudl avatar Aug 26 '19 13:08 renaudl

golang:1.12 work well

matteokjh avatar Aug 29 '19 13:08 matteokjh

An alternative is to go to Docker Desktop and select Switch to Linux Containers.

shantanoo-desai avatar Oct 21 '19 18:10 shantanoo-desai