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
d1627111
Commit
d1627111
authored
May 20, 2016
by
Filip Grzadkowski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #25767 from johscheuer/fix-hyperkube-makefile-2
Hyperkuber Makefile add support for OSX and Linux
parents
afea2e2f
cb11324c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
Makefile
cluster/images/hyperkube/Makefile
+9
-3
No files found.
cluster/images/hyperkube/Makefile
View file @
d1627111
...
@@ -21,7 +21,13 @@ REGISTRY?="gcr.io/google_containers"
...
@@ -21,7 +21,13 @@ REGISTRY?="gcr.io/google_containers"
ARCH
?=
amd64
ARCH
?=
amd64
TEMP_DIR
:=
$(
shell
mktemp
-d
)
TEMP_DIR
:=
$(
shell
mktemp
-d
)
UNAME_S
:=
$(
shell
uname
-s
)
ifeq
($(UNAME_S),Darwin)
SED_CMD
?=
sed
-i
""
endif
ifeq
($(UNAME_S),Linux)
SED_CMD
?=
sed
-i
endif
ifeq
($(ARCH),amd64)
ifeq
($(ARCH),amd64)
BASEIMAGE
?=
debian:jessie
BASEIMAGE
?=
debian:jessie
endif
endif
...
@@ -65,13 +71,13 @@ endif
...
@@ -65,13 +71,13 @@ endif
ifeq
($(ARCH),amd64)
ifeq
($(ARCH),amd64)
# When building "normally" for amd64, remove the whole line, it has no part in the amd64 image
# When building "normally" for amd64, remove the whole line, it has no part in the amd64 image
cd
${TEMP_DIR}
&&
sed
-i
"/CROSS_BUILD_/d"
Dockerfile
cd
${TEMP_DIR}
&&
${SED_CMD}
"/CROSS_BUILD_/d"
Dockerfile
else
else
# When cross-building, only the placeholder "CROSS_BUILD_" should be removed
# When cross-building, only the placeholder "CROSS_BUILD_" should be removed
# Register /usr/bin/qemu-ARCH-static as the handler for ARM binaries in the kernel
# Register /usr/bin/qemu-ARCH-static as the handler for ARM binaries in the kernel
docker run --rm --privileged multiarch/qemu-user-static
:
register --reset
docker run --rm --privileged multiarch/qemu-user-static
:
register --reset
curl
-sSL
--retry
5 https://github.com/multiarch/qemu-user-static/releases/download/v2.5.0/x86_64_qemu-
${
QEMUARCH
}
-static
.tar.xz |
tar
-xJ
-C
${
TEMP_DIR
}
curl
-sSL
--retry
5 https://github.com/multiarch/qemu-user-static/releases/download/v2.5.0/x86_64_qemu-
${
QEMUARCH
}
-static
.tar.xz |
tar
-xJ
-C
${
TEMP_DIR
}
cd
${
TEMP_DIR
}
&&
sed
-i
"s/CROSS_BUILD_//g"
Dockerfile
cd
${
TEMP_DIR
}
&&
${
SED_CMD
}
"s/CROSS_BUILD_//g"
Dockerfile
endif
endif
docker build -t ${REGISTRY}/hyperkube-${ARCH}
:
${VERSION} ${TEMP_DIR}
docker build -t ${REGISTRY}/hyperkube-${ARCH}
:
${VERSION} ${TEMP_DIR}
...
...
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