i've docker file which I run from my root project and it working ok Now I need to add project from my local machine to the image and I did it like following
ADD ../proj1 /go/src/proj1
Now I got error
Step 7/16 : ADD ../proj1 /go/src/proj1
ADD failed: Forbidden path outside the build context: ../proj1 ()
How can I overcome this? I dont want to put the proj1
under my root project
all other path's on the docker files are ok
FROM golang:alpine as builder
WORKDIR /go/src/rootproj
ADD . /go/src/rootproj
RUN CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' -o main .
ADD ../proj1 /go/src/proj1
And to build it I run
docker build -t myproj .