简体   繁体   中英

binary file not found on doing go build -o /bin/go_docker inside a docker file

below is the content of the dockerfile

FROM golang:1.8 as goimage

ENV SRC=/go/src/

RUN mkdir -p /go/src/

RUN mkdir /go/src/go_docker

WORKDIR /go/src/go_docker

RUN cd /go/src/go_docker

COPY StoreImage.go .

RUN go build -o /bin/go_docker

CMD ["/bin/go_docker"]

Docker build is successful for the above content.. But dont see the binary file generated in /bin/go_docker

Can someone please help me with this.

确保StoreImage.go可以复制到StoreImage.go

Binary file is created in /bin location and go_docker is the created binary file. .exe will not be the extension in linux whereas .exe will be seen only in windows

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM