-
Notifications
You must be signed in to change notification settings - Fork 95
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 #10 from VerizonMedia/docker-images-versioning
Support overriding image by using --image flag
- Loading branch information
Showing
8 changed files
with
86 additions
and
12 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
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,12 +1,17 @@ | ||
FROM golang:1.14-buster as agentbuild | ||
WORKDIR /go/src/github.com/VerizonMedia/kubectl-flame | ||
ADD . /go/src/github.com/VerizonMedia/kubectl-flame | ||
RUN go get -d -v ./... | ||
RUN cd agent && go build -o /go/bin/agent | ||
|
||
FROM openjdk:8-alpine as asyncprofiler | ||
RUN apk add build-base git linux-headers | ||
RUN git clone https://github.com/edeNFed/async-profiler.git | ||
RUN cd async-profiler && make | ||
|
||
FROM alpine | ||
RUN mkdir -p /app/async-profiler/build | ||
ADD agent /app | ||
COPY --from=agentbuild /go/bin/agent /app | ||
COPY --from=asyncprofiler /async-profiler/build /app/async-profiler/build | ||
COPY --from=asyncprofiler /async-profiler/profiler.sh /app/async-profiler | ||
CMD [ "/app/agent" ] | ||
|
||
CMD [ "/app/agent" ] |
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 |
---|---|---|
|
@@ -14,4 +14,5 @@ type TargetDetails struct { | |
FileName string | ||
Alpine bool | ||
DryRun bool | ||
Image string | ||
} |
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,18 @@ | ||
package version | ||
|
||
import "fmt" | ||
|
||
// populated by goreleaser | ||
var ( | ||
semver string | ||
commit string | ||
date string | ||
) | ||
|
||
func String() string { | ||
return fmt.Sprintf("Version: %s, Commit: %s, Build Date: %s", semver, commit, date) | ||
} | ||
|
||
func GetCurrent() string { | ||
return semver | ||
} |