Skip to content

Instantly share code, notes, and snippets.

@alextanhongpin
Created September 4, 2017 05:05
Show Gist options
  • Save alextanhongpin/7327de52ef39e5eeff4df0b73a0d4a36 to your computer and use it in GitHub Desktop.
Save alextanhongpin/7327de52ef39e5eeff4df0b73a0d4a36 to your computer and use it in GitHub Desktop.
$ docker build -t alextanhongpin/hello-world .
Sending build context to Docker daemon 2.018MB
Step 1/10 : FROM golang:1.9 as builder
 — -> 5e2f23f821ca
Step 2/10 : WORKDIR /go/src/github.com/alextanhongpin/hello-world
 — -> Using cache
 — -> d36bf8436458
Step 3/10 : COPY main.go .
 — -> Using cache
 — -> 2fa05dc652bc
Step 4/10 : RUN go get -d -v
 — -> Using cache
 — -> bb0f73ac82d1
Step 5/10 : RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
 — -> Using cache
 — -> 8b32d3f4cfd0
Step 6/10 : FROM alpine:latest
 — -> 7328f6f8b418
Step 7/10 : RUN apk — no-cache add ca-certificates
 — -> Using cache
 — -> 70fb51eb7cf7
Step 8/10 : WORKDIR /root/
 — -> Using cache
 — -> a7a3eea586d3
Step 9/10 : COPY — from=builder /go/src/github.com/alextanhongpin/hello-world/app .
 — -> Using cache
 — -> e723f2ddc2eb
Step 10/10 : CMD ./app
 — -> Using cache
 — -> 71995c167901
Successfully built 71995c167901
Successfully tagged alextanhongpin/hello-world:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment