Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
d46283b6
Commit
d46283b6
authored
Sep 19, 2018
by
Manjunath A Kumatagi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Manifest for debian-iptables image
parent
934d379a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
16 deletions
+29
-16
Makefile
build/debian-iptables/Makefile
+26
-5
README.md
build/debian-iptables/README.md
+3
-11
No files found.
build/debian-iptables/Makefile
View file @
d46283b6
...
@@ -12,16 +12,20 @@
...
@@ -12,16 +12,20 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
.PHONY
:
build push
.PHONY
:
build push
all all-build all-push-images all-push push-manifest
REGISTRY
?=
"staging-k8s.gcr.io"
REGISTRY
?=
"staging-k8s.gcr.io"
IMAGE
=
debian-iptables
IMAGE
=
$(REGISTRY)
/
debian-iptables
TAG
?=
v10.2
TAG
?=
v10.2
ARCH
?=
amd64
ARCH
?=
amd64
ALL_ARCH
=
amd64 arm arm64 ppc64le s390x
TEMP_DIR
:=
$(
shell
mktemp
-d
)
TEMP_DIR
:=
$(
shell
mktemp
-d
)
BASEIMAGE
?=
k8s.gcr.io/debian-base-
$(ARCH)
:0.3.2
BASEIMAGE
?=
k8s.gcr.io/debian-base-
$(ARCH)
:0.3.2
# This option is for running docker manifest command
export
DOCKER_CLI_EXPERIMENTAL
:=
enabled
build
:
build
:
cp
./
*
$(TEMP_DIR)
cp
./
*
$(TEMP_DIR)
cd
$(TEMP_DIR)
&&
sed
-i
"s|BASEIMAGE|
$(BASEIMAGE)
|g"
Dockerfile
cd
$(TEMP_DIR)
&&
sed
-i
"s|BASEIMAGE|
$(BASEIMAGE)
|g"
Dockerfile
...
@@ -31,9 +35,26 @@ ifneq ($(ARCH),amd64)
...
@@ -31,9 +35,26 @@ ifneq ($(ARCH),amd64)
docker run --rm --privileged multiarch/qemu-user-static
:
register --reset
docker run --rm --privileged multiarch/qemu-user-static
:
register --reset
endif
endif
docker build --pull -t $(
REGISTRY)/$(
IMAGE)-$(ARCH)
:
$(TAG) $(TEMP_DIR)
docker build --pull -t $(IMAGE)-$(ARCH)
:
$(TAG) $(TEMP_DIR)
push
:
build
push
:
build
docker push
$(REGISTRY)
/
$(IMAGE)
-
$(ARCH)
:
$(TAG)
docker push
$(IMAGE)
-
$(ARCH)
:
$(TAG)
sub-build-%
:
$(MAKE)
ARCH
=
$*
build
all-build
:
$(addprefix sub-build-
,
$(ALL_ARCH))
sub-push-image-%
:
$(MAKE)
ARCH
=
$*
push
all-push-images
:
$(addprefix sub-push-image-
,
$(ALL_ARCH))
all-push
:
all-push-images push-manifest
push-manifest
:
docker manifest create
--amend
$(IMAGE)
:
$(TAG)
$(
shell
echo
$(ALL_ARCH)
|
sed
-e
"s~[^ ]*~
$(IMAGE)
\-
&:
$(TAG)
~g"
)
@
for
arch
in
$(ALL_ARCH)
;
do
docker manifest annotate
--arch
$$
{
arch
}
${
IMAGE
}
:
${
TAG
}
${
IMAGE
}
-
$$
{
arch
}
:
${
TAG
}
;
done
docker manifest push
${
IMAGE
}
:
${
TAG
}
all
:
push
all
:
all-
push
build/debian-iptables/README.md
View file @
d46283b6
...
@@ -9,24 +9,16 @@ This image is compiled for multiple architectures.
...
@@ -9,24 +9,16 @@ This image is compiled for multiple architectures.
If you're editing the Dockerfile or some other thing, please bump the
`TAG`
in the Makefile.
If you're editing the Dockerfile or some other thing, please bump the
`TAG`
in the Makefile.
```
console
```
console
#
Build
for
linux/amd64
(
default
)
Build and push images for all the architectures
$
make
push
ARCH
=
amd64
$
make
all-push
#
---
>
staging-k8s.gcr.io/debian-iptables-amd64:TAG
#
---
>
staging-k8s.gcr.io/debian-iptables-amd64:TAG
$
make push
ARCH
=
arm
#
---
>
staging-k8s.gcr.io/debian-iptables-arm:TAG
#
---
>
staging-k8s.gcr.io/debian-iptables-arm:TAG
$
make push
ARCH
=
arm64
#
---
>
staging-k8s.gcr.io/debian-iptables-arm64:TAG
#
---
>
staging-k8s.gcr.io/debian-iptables-arm64:TAG
$
make push
ARCH
=
ppc64le
#
---
>
staging-k8s.gcr.io/debian-iptables-ppc64le:TAG
#
---
>
staging-k8s.gcr.io/debian-iptables-ppc64le:TAG
$
make push
ARCH
=
s390x
#
---
>
staging-k8s.gcr.io/debian-iptables-s390x:TAG
#
---
>
staging-k8s.gcr.io/debian-iptables-s390x:TAG
```
```
If you don't want to push the images, run
`make
`
or
`make
build`
instead
If you don't want to push the images, run
`make
build ARCH={target_arch}`
or
`make all-
build`
instead
[

]()
[

]()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment