-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from sarge/add-go-modules-to-docker-files
updated docker files to use go modules
- Loading branch information
Showing
5 changed files
with
45 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,36 @@ | ||
SOURCE_COMMIT := $(shell git log -1 --pretty=format:"%H") | ||
SOURCE_BRANCH := $(shell git branch | grep \* | cut -d ' ' -f2) | ||
TAG := target/flottbot | ||
|
||
.PHONY: all docker | ||
|
||
build: | ||
go build -v -a -o flottbot cmd/flottbot/main.go | ||
|
||
run: build | ||
./flottbot | ||
|
||
docker: | ||
docker build \ | ||
--build-arg "SOURCE_BRANCH=$(SOURCE_BRANCH)" \ | ||
--build-arg "SOURCE_COMMIT=$(SOURCE_COMMIT)" \ | ||
-f "./docker/Dockerfile" \ | ||
-t $(TAG) . | ||
|
||
docker build \ | ||
--build-arg "SOURCE_BRANCH=$(SOURCE_BRANCH)" \ | ||
--build-arg "SOURCE_COMMIT=$(SOURCE_COMMIT)" \ | ||
-f "./docker/Dockerfile.ruby" \ | ||
-t $(TAG):ruby . | ||
|
||
docker build \ | ||
--build-arg "SOURCE_BRANCH=$(SOURCE_BRANCH)" \ | ||
--build-arg "SOURCE_COMMIT=$(SOURCE_COMMIT)" \ | ||
-f "./docker/Dockerfile.python" \ | ||
-t $(TAG):python . | ||
|
||
docker build \ | ||
--build-arg "SOURCE_BRANCH=$(SOURCE_BRANCH)" \ | ||
--build-arg "SOURCE_COMMIT=$(SOURCE_COMMIT)" \ | ||
-f "./docker/Dockerfile.golang" \ | ||
-t $(TAG):golang . |
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
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