- Distributed Computing with Go
- V.N. Nikhil Anurag
- 154字
- 2021-06-24 18:36:08
Dockerfile
Now that we have the basics of Docker under our belt, let's look at the Dockerfile file we will be using as a template in this book.
Next, let's look at an example:
FROM golang:1.10
# The base image we want to use to build our docker image from.
# Since this image is specialized for golang it will have GOPATH = /go
ADD . /go/src/hello
# We copy files & folders from our system onto the docker image
RUN go install hello
# Next we can create an executable binary for our project with the command,
'go install' ENV NAME Bob
# Environment variable NAME will be picked up by the program 'hello'
and printed to console.ENTRYPOINT /go/bin/hello
# Command to execute when we start the container # EXPOSE 9000 # Generally used for network applications. Allows us to connect to the
application running inside the container from host system's localhost.
推薦閱讀
- Learning OpenDaylight
- Arch Linux Environment Setup How-to
- 蘋果電腦玩全攻略 OS X 10.8 Mountain Lion
- Windows Phone應用程序開發
- 混沌工程:復雜系統韌性實現之道
- Kubernetes從入門到實踐
- 嵌入式Linux應用開發菜鳥進階
- 網絡操作系統教程:Windows Server 2016管理與配置
- 一學就會:Windows Vista應用完全自學手冊
- 深入淺出Node.js
- NetDevOps入門與實踐
- 計算機系統的自主設計
- Distributed Computing with Go
- Introduction to R for Quantitative Finance
- Implementing Domain-Specific Languages with Xtext and Xtend(Second Edition)