Closed ranefattesingh closed 1 week ago
I was running my Go project for doing integration test but everytime I run the image I am getting the permission denied error.
/bin/sh: 1: /bin/: Permission denied
colima version 0.6.9 git commit: https://github.com/abiosoft/colima/commit/c3a31ed05f5fab8b2cdbae835198e8fb1717fd0f runtime: docker arch: aarch64 client: v26.1.4 server: v26.1.1
colima status
INFO[0000] colima is running using QEMU INFO[0000] arch: aarch64 INFO[0000] runtime: docker INFO[0000] mountType: 9p INFO[0000] socket: unix:///Users/uname/.colima/default/docker.sock
docker build -t apitest
docker run apitest
docker run apitest:latest
docker run apitest should start container
dockerfile used when building image
FROM golang:1.21.6-bookworm AS build ARG app_name=myapp RUN mkdir /app ADD . /app WORKDIR /app ENV CGO_ENABLED=1 RUN go build -mod=vendor -buildvcs=true -ldflags '-linkmode=external' -o $app_name ./cmd/$app_name/ FROM golang:1.21.6-bookworm ARG app_name=myapp ENV APP_NAME=$app_name COPY --from=build /app/$app_name /bin/$app_name RUN chmod +x /bin/$app_name EXPOSE 8080 ENTRYPOINT /bin/$app_name
found fix, it was due to entrypoint of the image hence closing this issue
Description
I was running my Go project for doing integration test but everytime I run the image I am getting the permission denied error.
/bin/sh: 1: /bin/: Permission denied
Version
Operating System
Output of
colima status
Reproduction Steps
docker build -t apitest
docker run apitest
ORdocker run apitest:latest
/bin/sh: 1: /bin/: Permission denied
Expected behaviour
docker run apitest should start container
Additional context
dockerfile used when building image