我成功地從 docker 文件構(gòu)建了一個(gè)Godocker 映像,但docker run -p port:port --name imagename imageid給了我permission denied錯(cuò)誤。這是我的碼頭文件FROM golang:1.17.2-alpine3.13 as buildWORKDIR /appCOPY . .RUN go build -o appFROM alpine:3.7COPY --from=build /app /usr/local/bin/go_webhooksRUN chmod +x /usr/local/bin/go_webhooksENTRYPOINT ["/usr/local/bin/go_webhooks"]我嘗試使用chmod但仍然無(wú)法解決它。實(shí)際的錯(cuò)誤信息是:docker run -p 8000:8000 --name go_webs3 d5f30e8f9703 docker: Error response from daemon: OCI runtime create failed:container_linux.go:380: starting container process caused: exec:"/usr/local/bin/go_webhooks": permission denied: unknown. ERRO[0000] error waiting for container: context canceled
運(yùn)行 Golang 的 docker 映像失敗,出現(xiàn)錯(cuò)誤“啟動(dòng)容器進(jìn)程導(dǎo)致:exec:
哆啦的時(shí)光機(jī)
2022-10-10 18:56:40