From b79c22b1ef6b8942a742925a360fd9991315e0d0 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Wed, 8 Aug 2018 09:49:18 -0400 Subject: [PATCH] Initial commit --- Dockerfile | 8 ++++++++ main.go | 15 +++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 Dockerfile create mode 100644 main.go diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f3faae1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM golang +WORKDIR /go/src/app +COPY . . +RUN go get -d -v ./... +RUN go install -v ./... + +EXPOSE 8080 +CMD ["app"] diff --git a/main.go b/main.go new file mode 100644 index 0000000..d6d9136 --- /dev/null +++ b/main.go @@ -0,0 +1,15 @@ +package main + +import ( + "fmt" + "log" + "net/http" +) + +func main() { + http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "Batts in the Belfry") + }) + + log.Fatal(http.ListenAndServe(":8080", nil)) +}