lifadev / archive_aws-lambda-go-shim

Author your AWS Lambda functions in Go, effectively.

Home Page:https://github.com/eawsy/aws-lambda-go-shim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect make file path.

davinchia opened this issue · comments

Was running into an issue where the Makefile would not successfully run make docker.

I think there is a path error with WORKDIR on line 32. There is a / missing at the end of the variable. It should be WORKDIR = $(CURDIR:$(GOPATH)%=/go/%) instead of WORKDIR = $(CURDIR:$(GOPATH)%=/go%).

Correct me I am wrong but don't think this is specific to my machine.

Hi @davinchia,

Can you please provide more details about what is going wrong with the output of these commands (while you are in the directory where the make command fails):

  • go env
  • pwd

Also it will not work with many paths in GOPATH:

λ make
docker: Error response from daemon: invalid bind mount spec "/home/dobek/golibs/os:/home/dobek/golibs/forks:/home/dobek/golibs/my:/go": invalid volume specification: '/home/dobek/golibs/os:/home/dobek/golibs/forks:/home/dobek/golibs/my:/go'.
See 'docker run --help'.
Makefile:38: recipe for target 'docker' failed
make: *** [docker] Error 125
λ go env                                                                                                           [17342d20h0m] ◼
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/dobek/golibs/os:/home/dobek/golibs/forks:/home/dobek/golibs/my"
GORACE=""
GOROOT="/home/dobek/.go"
GOTOOLDIR="/home/dobek/.go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build880088201=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

@matrixik update your example Makefile with the latest one and all should work for you 😉
@davinchia even if I haven't enough information about your exact issue, this new example Makefile should also do the job for you as a side effect of the @matrixik problem.
I will close the issue for now, but feel free to notify me if you encounter any problem.

I can confirm it's working now. Thank you!

Also works for me. Thanks!