-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dockerfile: add flexible Go version support (#14)
* add example code * update READM * some fixes
- Loading branch information
1 parent
a9a23c8
commit 1fe9fe1
Showing
5 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: '2.1' | ||
|
||
services: | ||
hello: | ||
image: canthefason/go-watcher:latest | ||
command: watcher -run hello | ||
ports: | ||
- "7000:7000" | ||
environment: | ||
- GO_VERSION=1.7 | ||
volumes: | ||
- ./hello:/go/src/hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"net/http" | ||
) | ||
|
||
func main() { | ||
http.ListenAndServe(":7000", | ||
http.HandlerFunc( | ||
func(w http.ResponseWriter, r *http.Request) { | ||
fmt.Fprintln(w, "watcher is running") | ||
}, | ||
), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters