Skip to content

Commit

Permalink
add dockerfile - fix action deps
Browse files Browse the repository at this point in the history
  • Loading branch information
gordallott committed Feb 1, 2024
1 parent a0e1b3b commit cba94a2
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git
.github
doc
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Test
run: go test -v ./...
- name: Build
run: go build -v sentinelexport ./cmd
run: go build -v -o artifacts/sentinelexport ./cmd
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: sentinelexport
path: sentinelexport
path: artifacts/sentinelexport
if-no-files-found: error
- name: Docker Login
uses: docker/[email protected]
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
secrets.env
artifacts/
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ubuntu:jammy

LABEL org.opencontainers.image.authors = "[email protected]"

RUN apt update; apt install -y ca-certificates

COPY artifacts/sentinelexport sentinelexport

ENV CONNECTION_STRING="" \
STORAGE_URL="" \
AXIOM_PERSONAL_TOKEN="" \
AXIOM_ORG="" \
AXIOM_URL="https://api.axiom.co"

CMD ./sentinelexport export --axiom-url="${AXIOM_URL}" --axiom-personal-org="${AXIOM_ORG}" --storage-url="${STORAGE_URL}"
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

var rootCmd = &cobra.Command{
Use: "axiomazure-exporter",
Use: "sentinelexport",
Short: "exports data from azure log anaytics (via storage) to axiom",
Long: `exports data from azure log anaytics (via storage) to axiom.
Expand Down

0 comments on commit cba94a2

Please sign in to comment.