Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
margaritalm authored May 16, 2024
1 parent ee6bf95 commit ded5c86
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN go mod download

# COPY the source code as the last step
COPY . .

USER myuser
# Build the Go app
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -a -installsuffix cgo -o sast-metadata cmd/sastmetadata/main.go cmd/sastmetadata/config.go

Expand All @@ -45,4 +45,11 @@ COPY --from=build-env /app/bases-migration /app/bases-migration
COPY --from=build-env /app/api /app/api
COPY --from=build-env /app/db /app/db


RUN apk add --no-cache git \
&& git config \
--global \
url."https://api:${GIT_TOKEN}@github.com".insteadOf \
"https://github.com"

ENTRYPOINT ["/app/sast-metadata"]

0 comments on commit ded5c86

Please sign in to comment.