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
e689d515
Unverified
Commit
e689d515
authored
Dec 05, 2018
by
Kubernetes Prow Robot
Committed by
GitHub
Dec 05, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #71634 from ereslibre/allow-to-build-images-offline
Allow to build docker images offline (do not always use `docker build --pull`)
parents
82cefcd9
68e6fa0f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
release.sh
build/lib/release.sh
+10
-1
No files found.
build/lib/release.sh
View file @
e689d515
...
@@ -30,6 +30,7 @@ readonly RELEASE_IMAGES="${LOCAL_OUTPUT_ROOT}/release-images"
...
@@ -30,6 +30,7 @@ readonly RELEASE_IMAGES="${LOCAL_OUTPUT_ROOT}/release-images"
KUBE_BUILD_HYPERKUBE
=
${
KUBE_BUILD_HYPERKUBE
:-
y
}
KUBE_BUILD_HYPERKUBE
=
${
KUBE_BUILD_HYPERKUBE
:-
y
}
KUBE_BUILD_CONFORMANCE
=
${
KUBE_BUILD_CONFORMANCE
:-
y
}
KUBE_BUILD_CONFORMANCE
=
${
KUBE_BUILD_CONFORMANCE
:-
y
}
KUBE_BUILD_PULL_LATEST_IMAGES
=
${
KUBE_BUILD_PULL_LATEST_IMAGES
:-
y
}
# Validate a ci version
# Validate a ci version
#
#
...
@@ -372,7 +373,15 @@ EOF
...
@@ -372,7 +373,15 @@ EOF
if
[[
"
${
base_image
}
"
=
~ busybox
]]
;
then
if
[[
"
${
base_image
}
"
=
~ busybox
]]
;
then
echo
"COPY nsswitch.conf /etc/"
>>
"
${
docker_file_path
}
"
echo
"COPY nsswitch.conf /etc/"
>>
"
${
docker_file_path
}
"
fi
fi
"
${
DOCKER
[@]
}
"
build
--pull
-q
-t
"
${
docker_image_tag
}
"
"
${
docker_build_path
}
"
>
/dev/null
# provide `--pull` argument to `docker build` if `KUBE_BUILD_PULL_LATEST_IMAGES`
# is set to y or Y; otherwise try to build the image without forcefully
# pulling the latest base image.
local
-a
docker_build_opts
=()
if
[[
"
${
KUBE_BUILD_PULL_LATEST_IMAGES
}
"
=
~
[
yY]
]]
;
then
docker_build_opts+
=(
"--pull"
)
fi
"
${
DOCKER
[@]
}
"
build
"
${
docker_build_opts
[@]
}
"
-q
-t
"
${
docker_image_tag
}
"
"
${
docker_build_path
}
"
>
/dev/null
"
${
DOCKER
[@]
}
"
save
"
${
docker_image_tag
}
"
>
"
${
binary_dir
}
/
${
binary_name
}
.tar"
"
${
DOCKER
[@]
}
"
save
"
${
docker_image_tag
}
"
>
"
${
binary_dir
}
/
${
binary_name
}
.tar"
echo
"
${
docker_tag
}
"
>
"
${
binary_dir
}
/
${
binary_name
}
.docker_tag"
echo
"
${
docker_tag
}
"
>
"
${
binary_dir
}
/
${
binary_name
}
.docker_tag"
rm
-rf
"
${
docker_build_path
}
"
rm
-rf
"
${
docker_build_path
}
"
...
...
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