Closed gopal-ramadugu closed 6 years ago
@gopal-ramadugu the build process inside windows is intended to be used with Make for Windows and not cygwin.
@fsenart I am getting the same error with gnuwin32 as well.
@gopal-ramadugu do you use the official Makefile to run your build?
@fsenart I downloaded the file from git using wget -O Makefile https://git.io/vytH8
Seeing your output it seems that the makefile is named 'makefile' and not 'Makefile'! It explains why it cannot find the file.
Can you please modify your local Makefile and change eawsy/aws-lambda-go-shim:latest make -f makefile all
by eawsy/aws-lambda-go-shim:latest make -f Makefile all
to see if it works. After what we have to know why the the makefile name is interpreted in lowercase.
I am getting same error after changing it to MakeFile.
C:\docker\preview>make docker run --rm\ -e HANDLER=handler\ -e PACKAGE=handler\ -e GOPATH=/C/Users/gopal.ramadugu/go\ -e LDFLAGS=''\ -v /C/docker/preview:/C/docker/preview\ -v /C/Users/gopal.ramadugu/go:/C/Users/gopal.ramadugu/go\ -w /C/docker/preview\ eawsy/aws-lambda-go-shim:latest make -f Makefile all make: Makefile: No such file or directory make: No rule to make target `Makefile'. Stop. make: [docker] Error 2
C:\docker\preview>dir Volume in drive C has no label. Volume Serial Number is
Directory of C:\docker\preview
10/25/2017 03:37 PM
@lsuss discovered the problem :wink: It seems you have a not properly configured Docker on your windows. Please read this article to allow your C drive to be mounted and shared by Docker and all should work. PS: obviously restart you windows, etc :trollface:
I use windows 7. We dont have the shared drivers on the docker settings. Windows 7 uses virtual box. There is a shared drive mapped in windows 7 for virtual box.
If I run below command it works. It seems to have an issue with eval of the directories. docker run --rm\ -e HANDLER=$(HANDLER)\ -e PACKAGE=$(PACKAGE)\ -e GOPATH=/c/Users/gopal.ramadugu/go\ -e LDFLAGS=''\ -v /c/Users/gopal.ramadugu/GoLambda/preview://c/Users/gopal.ramadugu/GoLambda/preview -v /c/Users/gopal.ramadugu/go:/c/Users/gopal.ramadugu/go\ -w /c/Users/gopal.ramadugu/GoLambda/preview\ eawsy/aws-lambda-go-shim:latest make -f /c/Users/gopal.ramadugu/GoLambda/preview/Makefile all
@gopal-ramadugu I don't understand why above in your beginning logs you have -v /C/docker/preview:/C/docker/preview
and now you have -v /c/Users/gopal.ramadugu/GoLambda/preview://c/Users/gopal.ramadugu/GoLambda/preview
. Have you changes anything between the two runs?
I think we have to create a dummy Makefile which prints various folders, etc to spot the difference between expectations and happenings.
@gopal-ramadugu:
/c/Users/gopal.ramadugu/GoLambda/preview
a sym link to /C/docker/preview
? It seems that Docker on your system only sets up C:/Users
by default as a shared folder. So, in your first run, it may be normal to fail. If you've changed directory between the two runs please retry with the official Makefile in /c/Users/gopal.ramadugu/GoLambda/preview
and tell me if it works out of the box.Please keep me informed about theses two remarks so we can resolve this issue soon. Thank you very much for your contribution.
I'm assuming this issue is resolved. Please reopen and comment if otherwise.
The make fails with below command. I am using cygwin64 for make. Am I missing something here ?
C:\docker>make docker run --rm\ -e HANDLER=handler\ -e PACKAGE=handler\ -e GOPATH=/C/Users/user/go\ -e LDFLAGS=''\ -v /C/docker:/C/docker\ -v /C/Users/user/go:/C/Users/user/go\ -w /C/docker\ eawsy/aws-lambda-go-shim:latest make -f makefile all make: makefile: No such file or directory make: No rule to make target `makefile'. Stop. make: [docker] Error 2
dir command:
Directory of C:\docker
10/23/2017 12:16 PM