-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build binaries and image for arm64 and arm
Signed-off-by: Carlos Panato <[email protected]>
- Loading branch information
Showing
4 changed files
with
123 additions
and
35 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,112 @@ | ||
project_name: falcosidekick | ||
|
||
snapshot: | ||
name_template: '{{ incpatch .Version }}-next' | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
|
||
builds: | ||
- id: "falcosidekick" | ||
goos: | ||
- linux | ||
- linux | ||
goarch: | ||
- amd64 | ||
- amd64 | ||
- arm64 | ||
- arm | ||
goarm: | ||
- '7' | ||
asmflags: | ||
- all=-trimpath={{.Env.GOPATH}} | ||
gcflags: | ||
- all=-trimpath={{.Env.GOPATH}} | ||
env: | ||
- CGO_ENABLED=0 | ||
flags: | ||
- -trimpath | ||
binary: falcosidekick | ||
|
||
dockers: | ||
- goos: linux | ||
goarch: amd64 | ||
dockerfile: Dockerfile | ||
use: buildx | ||
image_templates: | ||
- "falcosecurity/falcosidekick:stable-amd64" | ||
- "falcosecurity/falcosidekick:{{ .Version }}-amd64" | ||
- "public.ecr.aws/falcosecurity/falcosidekick:stable-amd64" | ||
- "public.ecr.aws/falcosecurity/falcosidekick:{{ .Version }}-amd64" | ||
build_flag_templates: | ||
- "--pull" | ||
- "--label=org.opencontainers.image.created={{.Date}}" | ||
- "--label=org.opencontainers.image.name={{.ProjectName}}" | ||
- "--label=org.opencontainers.image.revision={{.FullCommit}}" | ||
- "--label=org.opencontainers.image.version={{.Version}}" | ||
- "--platform=linux/amd64" | ||
extra_files: | ||
- LICENSE | ||
|
||
- goos: linux | ||
goarch: arm64 | ||
dockerfile: Dockerfile | ||
use: buildx | ||
image_templates: | ||
- "falcosecurity/falcosidekick:stable-arm64" | ||
- "falcosecurity/falcosidekick:{{ .Version }}-arm64" | ||
- "public.ecr.aws/falcosecurity/falcosidekick:stable-arm64" | ||
- "public.ecr.aws/falcosecurity/falcosidekick:{{ .Version }}-arm64" | ||
build_flag_templates: | ||
- "--pull" | ||
- "--label=org.opencontainers.image.created={{.Date}}" | ||
- "--label=org.opencontainers.image.name={{.ProjectName}}" | ||
- "--label=org.opencontainers.image.revision={{.FullCommit}}" | ||
- "--label=org.opencontainers.image.version={{.Version}}" | ||
- "--platform=linux/arm64" | ||
extra_files: | ||
- LICENSE | ||
|
||
- goos: linux | ||
goarch: arm | ||
goarm: '7' | ||
dockerfile: Dockerfile | ||
use: buildx | ||
image_templates: | ||
- "falcosecurity/falcosidekick:stable" | ||
- "falcosecurity/falcosidekick:{{ .Version }}" | ||
- "public.ecr.aws/falcosecurity/falcosidekick:stable" | ||
- "public.ecr.aws/falcosecurity/falcosidekick:{{ .Version }}" | ||
- "falcosecurity/falcosidekick:stable-armv7" | ||
- "falcosecurity/falcosidekick:{{ .Version }}-armv7" | ||
- "public.ecr.aws/falcosecurity/falcosidekick:stable-armv7" | ||
- "public.ecr.aws/falcosecurity/falcosidekick:{{ .Version }}-armv7" | ||
build_flag_templates: | ||
- "--pull" | ||
- "--label=org.opencontainers.image.created={{.Date}}" | ||
- "--label=org.opencontainers.image.name={{.ProjectName}}" | ||
- "--label=org.opencontainers.image.revision={{.FullCommit}}" | ||
- "--label=org.opencontainers.image.version={{.Version}}" | ||
- "--platform=linux/arm/v7" | ||
extra_files: | ||
- outputs | ||
- types | ||
- config.go | ||
- handlers.go | ||
- main.go | ||
- stats_prometheus.go | ||
- stats.go | ||
- go.mod | ||
- go.sum | ||
- Makefile | ||
- LICENSE | ||
|
||
docker_manifests: | ||
- name_template: 'falcosecurity/falcosidekick:stable' | ||
image_templates: | ||
- 'falcosecurity/falcosidekick:stable-amd64' | ||
- 'falcosecurity/falcosidekick:stable-arm64' | ||
- 'falcosecurity/falcosidekick:stable-armv7' | ||
- name_template: 'falcosecurity/falcosidekick:{{ .Version }}' | ||
image_templates: | ||
- 'falcosecurity/falcosidekick:{{ .Version }}-amd64' | ||
- 'falcosecurity/falcosidekick:{{ .Version }}-arm64' | ||
- 'falcosecurity/falcosidekick:{{ .Version }}-armv7' | ||
- name_template: 'public.ecr.aws/falcosecurity/falcosidekick:stable' | ||
image_templates: | ||
- 'public.ecr.aws/falcosecurity/falcosidekick:stable-amd64' | ||
- 'public.ecr.aws/falcosecurity/falcosidekick:stable-arm64' | ||
- 'public.ecr.aws/falcosecurity/falcosidekick:stable-armv7' | ||
- name_template: 'public.ecr.aws/falcosecurity/falcosidekick:{{ .Version }}' | ||
image_templates: | ||
- 'public.ecr.aws/falcosecurity/falcosidekick:{{ .Version }}-amd64' | ||
- 'public.ecr.aws/falcosecurity/falcosidekick:{{ .Version }}-arm64' | ||
- 'public.ecr.aws/falcosecurity/falcosidekick:{{ .Version }}-armv7' | ||
|
||
release: | ||
github: | ||
prerelease: auto |
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 |
---|---|---|
@@ -1,16 +1,4 @@ | ||
ARG BUILDER_IMAGE=golang:1.16-buster | ||
ARG BASE_IMAGE=alpine:3.12 | ||
|
||
FROM ${BUILDER_IMAGE} AS build-stage | ||
|
||
ENV CGO_ENABLED=0 | ||
|
||
WORKDIR /src | ||
COPY . . | ||
|
||
RUN go mod download | ||
RUN make falcosidekick | ||
|
||
# Final Docker image | ||
FROM ${BASE_IMAGE} AS final-stage | ||
LABEL MAINTAINER "Thomas Labarussias <[email protected]>" | ||
|
@@ -24,8 +12,8 @@ RUN addgroup -S falcosidekick && adduser -u 1234 -S falcosidekick -G falcosideki | |
USER 1234 | ||
|
||
WORKDIR ${HOME}/app | ||
COPY --from=build-stage /src/LICENSE . | ||
COPY --from=build-stage /src/falcosidekick . | ||
COPY LICENSE . | ||
COPY falcosidekick . | ||
|
||
EXPOSE 2801 | ||
|
||
|
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