i have Makefiles on my app , and all my commands on Makefile
i put this on Dockerfile:
# start from the latest golang base image FROM golang:alpine RUN apk update && apk add --no-cache gcc && apk add --no-cache libc-dev # Set the current working Directory inside the container WORKDIR /app # Copy go mod and sum files COPY go.mod go.sum ./ # Download all dependencies. they will be cached of the go.mod and go.sum files are not changed RUN go mod download # Copy the source from the current directory to the WORKDIR inisde the container COPY . . # Build the Go app RUN go build . # Exporse port 3000 or 8000 to the outisde world EXPOSE 3000 # Command to run the executable CMD ["make", "-C", "scripts", "test" ] CMD ["make", "-C", "scripts", "prod" ]
docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: "make": executable file not found in $PATH": unknown.
is it possible to run
make -c scripts test in Docker? how to correct way to use this command in Docker?
dockerfile i run