Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker build failure for examples/out_multiinstance/Dockerfile #40

Open
frcai opened this issue Mar 10, 2021 · 2 comments
Open

docker build failure for examples/out_multiinstance/Dockerfile #40

frcai opened this issue Mar 10, 2021 · 2 comments

Comments

@frcai
Copy link

frcai commented Mar 10, 2021

Follow https://github.com/fluent/fluent-bit-go/tree/master/examples/out_multiinstance and hit No rule to make target 'all'.

~/fluent-bit-go$ sudo docker build . -t fluent-bit-multiinstance -f examples/out_multiinstance/Dockerfile
Sending build context to Docker daemon 164.9kB
Step 1/12 : FROM golang:1.14 as gobuilder
---> 21a5635903d6
Step 2/12 : WORKDIR /root
---> Using cache
---> cac906ec79de
Step 3/12 : ENV GOOS=linux GOARCH=amd64
---> Using cache
---> bf8c66726cbd
Step 4/12 : COPY / /root/
---> Using cache
---> 307205a0b494
Step 5/12 : RUN go mod edit -replace github.com/fluent/fluent-bit-go=github.com/fluent/fluent-bit-go@master
---> Using cache
---> a8571dbaaa4c
Step 6/12 : RUN go mod download & make all
---> Running in 1ba930ea937b
make: *** No rule to make target 'all'. Stop.
The command '/bin/sh -c go mod download & make all' returned a non-zero code: 2

@xiviu123
Copy link

all:
	go build -buildmode=c-shared -o out_multiinstance.so

check this line in make file

@4fath
Copy link

4fath commented Dec 6, 2021

here, issue is build context and Dockerfile copy command.
it copies into /root from build context which is not correct path for examples/out_multiinstance.
what you can do is, changing your directory to examples/out_multiinstance and using followings in your Dockerfile:


RUN go mod download
RUN go build -buildmode=c-shared -o out_multiinstance.so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants