Skip to content

Commit

Permalink
dockerfile: fix missing git build info (#378)
Browse files Browse the repository at this point in the history
Git commit info is only included in build info if a package is built, not a file.

category: bug
ticket: #367
  • Loading branch information
corverroos committed Apr 6, 2022
1 parent 9093af4 commit 71ca23f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Container for building Go binary.
FROM golang:1.18-alpine AS builder
# Cgo support
RUN apk add --no-cache build-base
# Copy app.
# Install dependencies
RUN apk add --no-cache build-base git
# Prep and copy source
WORKDIR /app
COPY . .
# Build with Go module and Go build caches.
RUN \
--mount=type=cache,target=/go/pkg \
--mount=type=cache,target=/root/.cache/go-build \
go build -o charon main.go
go build -o charon .

# Copy final binary into light stage.
FROM alpine:3
Expand Down

0 comments on commit 71ca23f

Please sign in to comment.