我的 Dockerfile 上的权限分配似乎有错误,我似乎无法解决它。这是错误Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/my-app": permission denied: unknown这是我的 Dockerfile# syntax=docker/dockerfile:1#### Build##FROM golang:1.19rc2-buster AS buildWORKDIR /appCOPY src/go.mod ./COPY src/go.sum ./RUN go mod downloadCOPY src/*.go ./RUN go build -o /my-app#### Deploy##FROM gcr.io/distroless/base-debian10WORKDIR /COPY --from=build /my-app /my-appUSER nonroot:nonrootENTRYPOINT ["/my-app"]这是我的 docker-composeversion: "3.7"services: golang: container_name: golang build: dockerfile: go.Dockerfile ports: - 8080:80 depends_on: - cassandra restart: always cassandra: container_name: cassandra image: cassandra:latest restart: always ports: - 9042:9042
- 1 回答
- 0 关注
- 178 浏览
添加回答
举报
0/150
提交
取消