Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modules/go mods #9

Merged
merged 5 commits into from
Feb 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
FROM golang:alpine3.8 AS build-stage
RUN mkdir /src
# Build image (Golang)
FROM golang:1.11-alpine3.8 AS build-stage
Issif marked this conversation as resolved.
Show resolved Hide resolved
ENV GO111MODULE on
ENV CGO_ENABLED 0

RUN apk add --no-cache gcc git make

WORKDIR /src
ADD . .

RUN go mod download
RUN go build -o falcosidekick

# Final Docker image
FROM alpine:3.8 AS final-stage
LABEL MAINTAINER "Thomas Labarussias <issif+falcosidekick@gadz.org>"

RUN apk add --no-cache ca-certificates
RUN mkdir /app
WORKDIR /app

# Create user falcosidekick
RUN addgroup -S falcosidekick && adduser -S falcosidekick -G falcosidekick
USER falcosidekick

WORKDIR ${HOME}/app
COPY --from=build-stage /src/falcosidekick .

EXPOSE 2801

ENTRYPOINT ["./falcosidekick"]
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module github.com/Issif/falcosidekick
4 changes: 2 additions & 2 deletions handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"net/http"
"os"

"./outputs"
"./types"
"github.com/Issif/falcosidekick/outputs"
"github.com/Issif/falcosidekick/types"
)

// Print falco's payload in stdout (for debug) of daemon
Expand Down
2 changes: 1 addition & 1 deletion outputs/alertmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os"
"strings"

"../types"
"github.com/Issif/falcosidekick/types"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion outputs/datadog.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"os"

"../types"
"github.com/Issif/falcosidekick/types"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion outputs/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"os"

"../types"
"github.com/Issif/falcosidekick/types"
)

// Field
Expand Down