Skip to content

Instantly share code, notes, and snippets.

@ngauthier

ngauthier/Dockerfile

Last active Mar 21, 2016
Embed
What would you like to do?
GDG Docker App Example

GDG Docker Code Lab Example App

Build it:

$ docker build -t greeter .

Run it:

$ docker run -it greeter
Enter your name: Nick
Hello Nick!
FROM golang
ADD main.go ./
RUN go build -o greeter main.go
CMD ["./greeter"]
package main
import (
"fmt"
"os"
)
func main() {
var name string
fmt.Printf("Enter your name: ")
fmt.Fscanln(os.Stdin, &name)
fmt.Printf("Hello %s!\n", name)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment