You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I was trying to build the docker container from the 1.6.3 repo as described into the documentation. The Makefile did not work. This is because the makefile does not use proper absolute path. Another reason why the makefile fails is because of using double quotes on the arguments used to build the image.
The error that showed up: C:\Program Files\Docker\Docker\resources\bin\docker.exe: Error response from daemon: the working directory 'C:/Program Files/Git/go/src/github.com/nginxinc/kubernetes-ingress/cmd/nginx-ingress/' is invalid, it needs to be an absolute path. See 'C:\Program Files\Docker\Docker\resources\bin\docker.exe run --help'. make: *** [Makefile:25: nginx-ingress] Error 125
Expected Behavior:
To probably build the image from the repo.
FIX: I was able to fix this by updating the Makefile by doing the following:
I updated to provide the absolute path: CURRENT_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) $(info Current Directory: $(CURRENT_DIR))
DOCKER_TEST_RUN = docker run --rm -v $(CURRENT_DIR):/go/src/github.com/nginxinc/kubernetes-ingress -w /go/src/github.com/nginxinc/kubernetes-ingress DOCKER_BUILD_RUN = docker run --rm -v $(CURRENT_DIR):/go/src/github.com/nginxinc/kubernetes-ingress -w /go/src/github.com/nginxinc/kubernetes-ingress/cmd/nginx-ingress/
Then I was still getting an error message. So then I determined that it was because of the double quotes in the argument. Fixed by doing: $(DOCKER_BUILD_RUN) -e CGO_ENABLED=0 -e GO111MODULE=on -e GOFLAGS='$(GOFLAGS)' $(GOLANG_CONTAINER) go build -installsuffix cgo -ldflags '-w -X main.version=${VERSION} -X main.gitCommit=${GIT_COMMIT}' -o /go/src/github.com/nginxinc/kubernetes-ingress/nginx-ingress
Issue: Now I am running into this issue and not sure why the template is within the docker container: F0418 16:01:31.602234 1 main.go:234] Error creating TemplateExecutor: open nginx-plus.tmpl: no such file or directory
Question: Can i get a free T-shirt lol. 😀
The text was updated successfully, but these errors were encountered:
We recently improved the process of building NGINX Plus image: the Docker no longer uses volume mounts and instead usex multi-state Docker build instead. #825
That was done largely because of the feedback we had heard from Windows users. They would encounter errors during Docker build.
Unfortunately, that improvement is not part of 1.6.3 release. However, it will be part of the 1.7.0 release. You can already try it if you use the edge version (source from the master branch).
@pleshakov I've tried 1.6.3 on Ubuntu as well and got the same result. I changed to use absolute paths and am really having issues with the templates being found. I will try to use the edge version.
When I was trying to build the docker container from the 1.6.3 repo as described into the documentation. The Makefile did not work. This is because the makefile does not use proper absolute path. Another reason why the makefile fails is because of using double quotes on the arguments used to build the image.
Specs:
Windows 10 Pro
CMDR Terminal
Using the Git Repo: https://github.com/nginxinc/kubernetes-ingress/
Followed the instructions here:
https://docs.nginx.com/nginx-ingress-controller/installation/building-ingress-controller-image/
The error that showed up:
C:\Program Files\Docker\Docker\resources\bin\docker.exe: Error response from daemon: the working directory 'C:/Program Files/Git/go/src/github.com/nginxinc/kubernetes-ingress/cmd/nginx-ingress/' is invalid, it needs to be an absolute path. See 'C:\Program Files\Docker\Docker\resources\bin\docker.exe run --help'. make: *** [Makefile:25: nginx-ingress] Error 125
Expected Behavior:
To probably build the image from the repo.
FIX: I was able to fix this by updating the Makefile by doing the following:
I updated to provide the absolute path:
CURRENT_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) $(info Current Directory: $(CURRENT_DIR))
DOCKER_TEST_RUN = docker run --rm -v $(CURRENT_DIR):/go/src/github.com/nginxinc/kubernetes-ingress -w /go/src/github.com/nginxinc/kubernetes-ingress DOCKER_BUILD_RUN = docker run --rm -v $(CURRENT_DIR):/go/src/github.com/nginxinc/kubernetes-ingress -w /go/src/github.com/nginxinc/kubernetes-ingress/cmd/nginx-ingress/
Then I was still getting an error message. So then I determined that it was because of the double quotes in the argument. Fixed by doing:
$(DOCKER_BUILD_RUN) -e CGO_ENABLED=0 -e GO111MODULE=on -e GOFLAGS='$(GOFLAGS)' $(GOLANG_CONTAINER) go build -installsuffix cgo -ldflags '-w -X main.version=${VERSION} -X main.gitCommit=${GIT_COMMIT}' -o /go/src/github.com/nginxinc/kubernetes-ingress/nginx-ingress
Issue: Now I am running into this issue and not sure why the template is within the docker container:
F0418 16:01:31.602234 1 main.go:234] Error creating TemplateExecutor: open nginx-plus.tmpl: no such file or directory
Question: Can i get a free T-shirt lol. 😀
The text was updated successfully, but these errors were encountered: