I use ENTRYPOINT["./app"]
in dockerfile, when I use the other larger image, it was work
But when I used alpine, it told me exec ./app: no such file or directory
And I'm sure the file is exist in container
I'm guess alpine doesn't have bash, so I try to use RUN apk update && apk add bash
, but it still not work
What's wrong?
Here is my dockerfile:
FROM golang AS build
WORKDIR /app
COPY . .
RUN cd ./src && go build -o ../bin/app
RUN rm -r src/ .vscode/ .git/
FROM alpine AS release
COPY --from=build /app /app
WORKDIR /app/bin
ENTRYPOINT ["./app"]
And this is container content:
Even I install bash, it still not found
Also I just forgot to say, docker runs on the wsl2