Default Build
This commit is contained in:
parent
bd8d884f09
commit
44a10de0f6
1 changed files with 6 additions and 4 deletions
10
Dockerfile
10
Dockerfile
|
@ -7,10 +7,12 @@ COPY . .
|
|||
|
||||
RUN go get -d -v ./...
|
||||
|
||||
RUN export I_PACKAGE="git.ucode.space/Phil/goshorly/utils" && \
|
||||
export I_GitCommitShort=$(git rev-parse --short HEAD) && \
|
||||
export I_GitBranch=$(git rev-parse --abbrev-ref HEAD) && \
|
||||
go build -a -installsuffix cgo -ldflags "-X $I_PACKAGE.GitCommitShort=$I_GitCommitShort -X $I_PACKAGE.GitBranch=$I_GitBranch" -o app .
|
||||
# RUN export I_PACKAGE="git.ucode.space/Phil/goshorly/utils" && \
|
||||
# export I_GitCommitShort=$(git rev-parse --short HEAD) && \
|
||||
# export I_GitBranch=$(git rev-parse --abbrev-ref HEAD) && \
|
||||
# go build -a -installsuffix cgo -ldflags "-X $I_PACKAGE.GitCommitShort=$I_GitCommitShort -X $I_PACKAGE.GitBranch=$I_GitBranch" -o app .
|
||||
|
||||
RUN go build -o app .
|
||||
|
||||
FROM scratch as production
|
||||
WORKDIR /goshorly
|
||||
|
|
Loading…
Reference in a new issue