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
0ea49201
Commit
0ea49201
authored
Sep 19, 2018
by
Manjunath A Kumatagi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Image manifest for debian-base
parent
b9267f4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
5 deletions
+27
-5
Makefile
build/debian-base/Makefile
+27
-5
No files found.
build/debian-base/Makefile
View file @
0ea49201
...
@@ -12,19 +12,24 @@
...
@@ -12,19 +12,24 @@
# 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.
all
:
build
all
:
all-
build
REGISTRY
?=
staging-k8s.gcr.io
REGISTRY
?=
staging-k8s.gcr.io
IMAGE
?=
debian-base
IMAGE
?=
$(REGISTRY)
/
debian-base
BUILD_IMAGE
?=
debian-build
BUILD_IMAGE
?=
debian-build
TAG
?=
0.3.2
TAG
?=
0.3.2
TAR_FILE
?=
rootfs.tar
TAR_FILE
?=
rootfs.tar
ARCH
?=
amd64
ARCH
?=
amd64
ALL_ARCH
=
amd64 arm arm64 ppc64le s390x
TEMP_DIR
:=
$(
shell
mktemp
-d
)
TEMP_DIR
:=
$(
shell
mktemp
-d
)
QEMUVERSION
=
v2.9.1
QEMUVERSION
=
v2.9.1
# This option is for running docker manifest command
export
DOCKER_CLI_EXPERIMENTAL
:=
enabled
ifeq
($(ARCH),amd64)
ifeq
($(ARCH),amd64)
BASEIMAGE
?=
debian:stretch
BASEIMAGE
?=
debian:stretch
endif
endif
...
@@ -45,6 +50,23 @@ ifeq ($(ARCH),s390x)
...
@@ -45,6 +50,23 @@ ifeq ($(ARCH),s390x)
QEMUARCH
=
s390x
QEMUARCH
=
s390x
endif
endif
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
}
build
:
clean
build
:
clean
cp
./
*
$(TEMP_DIR)
cp
./
*
$(TEMP_DIR)
cat
Dockerfile.build
\
cat
Dockerfile.build
\
...
@@ -69,13 +91,13 @@ endif
...
@@ -69,13 +91,13 @@ endif
docker
build
--pull
-t
$(BUILD_IMAGE)
-f
$(TEMP_DIR)/Dockerfile.build
$(TEMP_DIR)
docker
build
--pull
-t
$(BUILD_IMAGE)
-f
$(TEMP_DIR)/Dockerfile.build
$(TEMP_DIR)
docker
create
--name
$(BUILD_IMAGE)
$(BUILD_IMAGE)
docker
create
--name
$(BUILD_IMAGE)
$(BUILD_IMAGE)
docker
export
$(BUILD_IMAGE)
>
$(TEMP_DIR)/$(TAR_FILE)
docker
export
$(BUILD_IMAGE)
>
$(TEMP_DIR)/$(TAR_FILE)
docker build -t $(
REGISTRY)/$(
IMAGE)-$(ARCH)
:
$(TAG) $(TEMP_DIR)
docker build -t $(IMAGE)-$(ARCH)
:
$(TAG) $(TEMP_DIR)
rm
-rf
$(TEMP_DIR)
rm
-rf
$(TEMP_DIR)
push
:
build
push
:
build
docker push
$(
REGISTRY)
/
$(
IMAGE)
-
$(ARCH)
:
$(TAG)
docker push
$(IMAGE)
-
$(ARCH)
:
$(TAG)
clean
:
clean
:
docker rmi
-f
$(
REGISTRY)
/
$(
IMAGE)
-
$(ARCH)
:
$(TAG)
||
true
docker rmi
-f
$(IMAGE)
-
$(ARCH)
:
$(TAG)
||
true
docker rmi
-f
$(BUILD_IMAGE)
||
true
docker rmi
-f
$(BUILD_IMAGE)
||
true
docker
rm
-f
$(BUILD_IMAGE)
||
true
docker
rm
-f
$(BUILD_IMAGE)
||
true
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