Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
flux2
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
fluxcd
flux2
Commits
a5a7d797
Commit
a5a7d797
authored
4 years ago
by
Hidde Beydals
Browse files
Options
Downloads
Patches
Plain Diff
Publish AMD64, ARM64, ARMv7 images for binary
Signed-off-by:
Hidde Beydals
<
hello@hidde.co
>
parent
cccfb3a5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+3
-0
3 additions, 0 deletions
.gitignore
.goreleaser.yml
+61
-0
61 additions, 0 deletions
.goreleaser.yml
Dockerfile
+23
-0
23 additions, 0 deletions
Dockerfile
with
87 additions
and
0 deletions
.gitignore
+
3
−
0
View file @
a5a7d797
...
...
@@ -11,6 +11,9 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Release
dist/
# Dependency directories (remove the comment below to include it)
# vendor/
bin/
...
...
This diff is collapsed.
Click to expand it.
.goreleaser.yml
+
61
−
0
View file @
a5a7d797
...
...
@@ -74,3 +74,64 @@ release:
extra_files
:
-
glob
:
./output/manifests.tar.gz
-
glob
:
./output/install.yaml
dockers
:
-
image_templates
:
-
'
fluxcd/flux-cli:{{
.Tag
}}-amd64'
-
'
ghcr.io/fluxcd/flux-cli:{{
.Tag
}}-amd64'
dockerfile
:
Dockerfile
use_buildx
:
true
goos
:
linux
goarch
:
amd64
build_flag_templates
:
-
"
--pull"
-
"
--build-arg=ARCH=linux/amd64"
-
"
--label=org.opencontainers.image.created={{
.Date
}}"
-
"
--label=org.opencontainers.image.name={{
.ProjectName
}}"
-
"
--label=org.opencontainers.image.revision={{
.FullCommit
}}"
-
"
--label=org.opencontainers.image.version={{
.Version
}}"
-
"
--label=org.opencontainers.image.source={{
.GitURL
}}"
-
"
--platform=linux/amd64"
-
image_templates
:
-
'
fluxcd/flux-cli:{{
.Tag
}}-arm64'
-
'
ghcr.io/fluxcd/flux-cli:{{
.Tag
}}-arm64'
dockerfile
:
Dockerfile
use_buildx
:
true
goos
:
linux
goarch
:
arm64
build_flag_templates
:
-
"
--pull"
-
"
--build-arg=ARCH=linux/arm64"
-
"
--label=org.opencontainers.image.created={{
.Date
}}"
-
"
--label=org.opencontainers.image.name={{
.ProjectName
}}"
-
"
--label=org.opencontainers.image.revision={{
.FullCommit
}}"
-
"
--label=org.opencontainers.image.version={{
.Version
}}"
-
"
--label=org.opencontainers.image.source={{
.GitURL
}}"
-
"
--platform=linux/arm64"
-
image_templates
:
-
'
fluxcd/flux-cli:{{
.Tag
}}-arm'
-
'
ghcr.io/fluxcd/flux-cli:{{
.Tag
}}-arm'
dockerfile
:
Dockerfile
use_buildx
:
true
goos
:
linux
goarch
:
arm
goarm
:
7
build_flag_templates
:
-
"
--pull"
-
"
--build-arg=ARCH=linux/arm"
-
"
--label=org.opencontainers.image.created={{
.Date
}}"
-
"
--label=org.opencontainers.image.name={{
.ProjectName
}}"
-
"
--label=org.opencontainers.image.revision={{
.FullCommit
}}"
-
"
--label=org.opencontainers.image.version={{
.Version
}}"
-
"
--label=org.opencontainers.image.source={{
.GitURL
}}"
-
"
--platform=linux/arm/v7"
docker_manifests
:
-
name_template
:
'
fluxcd/flux-cli:{{
.Tag
}}'
image_templates
:
-
'
fluxcd/flux-cli:{{
.Tag
}}-amd64'
-
'
fluxcd/flux-cli:{{
.Tag
}}-arm64'
-
'
fluxcd/flux-cli:{{
.Tag
}}-arm'
-
name_template
:
'
ghcr.io/fluxcd/flux-cli:{{
.Tag
}}'
image_templates
:
-
'
ghcr.io/fluxcd/flux-cli:{{
.Tag
}}-amd64'
-
'
ghcr.io/fluxcd/flux-cli:{{
.Tag
}}-arm64'
-
'
ghcr.io/fluxcd/flux-cli:{{
.Tag
}}-arm'
This diff is collapsed.
Click to expand it.
Dockerfile
0 → 100644
+
23
−
0
View file @
a5a7d797
FROM
alpine:3.13
as
builder
RUN
apk add
--no-cache
ca-certificates curl
ARG
ARCH=linux/amd64
ARG
KUBECTL_VER=1.20.4
RUN
curl
-sL
https://storage.googleapis.com/kubernetes-release/release/v
${
KUBECTL_VER
}
/bin/
${
ARCH
}
/kubectl
\
-o
/usr/local/bin/kubectl
&&
chmod
+x /usr/local/bin/kubectl
&&
\
kubectl version
--client
=
true
FROM
alpine:3.13
as
flux-cli
# Create minimal nsswitch.conf file to prioritize the usage of /etc/hosts over DNS queries.
# https://github.com/gliderlabs/docker-alpine/issues/367#issuecomment-354316460
RUN
[
!
-e
/etc/nsswitch.conf
]
&&
echo
'hosts: files dns'
>
/etc/nsswitch.conf
RUN
apk add
--no-cache
ca-certificates
COPY
--from=builder /usr/local/bin/kubectl /usr/local/bin/
COPY
--chmod=755 flux /usr/local/bin/
ENTRYPOINT
[ "flux" ]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment