-
Notifications
You must be signed in to change notification settings - Fork 630
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 grafana/phlare#16 from grafana/20220609_docker_image
Add docker image and pipelines
- Loading branch information
Showing
4 changed files
with
103 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM golang:1.18.2 as build | ||
|
||
WORKDIR /src/fire | ||
|
||
COPY go.mod go.sum /src/fire/ | ||
RUN go mod download | ||
|
||
COPY . /src/fire | ||
|
||
RUN make clean build | ||
|
||
FROM alpine:3.16.0 | ||
|
||
RUN apk add --no-cache ca-certificates | ||
|
||
COPY --from=build /src/fire/bin/fire /usr/bin/fire | ||
COPY cmd/fire/fire.yaml /etc/fire/config.yaml | ||
|
||
RUN addgroup -g 10001 -S fire && \ | ||
adduser -u 10001 -S fire -G fire | ||
RUN mkdir -p /fire/rules && \ | ||
mkdir -p /fire/rules-temp && \ | ||
chown -R fire:fire /etc/fire /fire | ||
|
||
USER fire | ||
EXPOSE 4100 | ||
ENTRYPOINT [ "/usr/bin/fire" ] | ||
CMD ["-config.file=/etc/fire/config.yaml"] |
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,13 @@ | ||
#!/usr/bin/env bash | ||
# SPDX-License-Identifier: AGPL-3.0-only | ||
# Provenance-includes-location: https://github.com/cortexproject/cortex/blob/master/tools/image-tag | ||
# Provenance-includes-license: Apache-2.0 | ||
# Provenance-includes-copyright: The Cortex Authors. | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
WORKING_SUFFIX=$(if git status --porcelain | grep -qE '^(?:[^?][^ ]|[^ ][^?])\s'; then echo "-WIP"; else echo ""; fi) | ||
BRANCH_PREFIX=$(git rev-parse --abbrev-ref HEAD) | ||
echo "${BRANCH_PREFIX//\//-}-$(git rev-parse --short HEAD)$WORKING_SUFFIX" |