2020
09-27
09-27
Docker 部署Go的两种基础镜像的实现
一、golang:latest基础镜像mkdirgotesttouchmain.gotouchDockerfile1.实例代码packagemainimport("fmt""log""net/http")funcmain(){http.HandleFunc("/",func(writerhttp.ResponseWriter,request*http.Request){fmt.Fprint(writer,"HelloWorld")})fmt.Println("3000!!")log.Fatal(http.ListenAndServe(":3000",nil))}2.Dockerfile配置#源镜像FROMgolang:latest#设置工作...
继续阅读 >