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
041f152e
Commit
041f152e
authored
Jan 19, 2016
by
Isaac Hollander McCreery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add flag to force pull on docker build
parent
e95dd01a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
common.sh
build/common.sh
+6
-2
No files found.
build/common.sh
View file @
041f152e
...
@@ -480,7 +480,9 @@ function kube::build::build_image() {
...
@@ -480,7 +480,9 @@ function kube::build::build_image() {
kube::version::save_version_vars
"
${
build_context_dir
}
/kube-version-defs"
kube::version::save_version_vars
"
${
build_context_dir
}
/kube-version-defs"
cp
build/build-image/Dockerfile
${
build_context_dir
}
/Dockerfile
cp
build/build-image/Dockerfile
${
build_context_dir
}
/Dockerfile
kube::build::docker_build
"
${
KUBE_BUILD_IMAGE
}
"
"
${
build_context_dir
}
"
# We don't want to force-pull this image because it's based on a local image
# (see kube::build::build_image_cross), not upstream.
kube::build::docker_build
"
${
KUBE_BUILD_IMAGE
}
"
"
${
build_context_dir
}
"
'false'
}
}
# Build the kubernetes golang cross base image.
# Build the kubernetes golang cross base image.
...
@@ -496,10 +498,12 @@ function kube::build::build_image_cross() {
...
@@ -496,10 +498,12 @@ function kube::build::build_image_cross() {
# Build a docker image from a Dockerfile.
# Build a docker image from a Dockerfile.
# $1 is the name of the image to build
# $1 is the name of the image to build
# $2 is the location of the "context" directory, with the Dockerfile at the root.
# $2 is the location of the "context" directory, with the Dockerfile at the root.
# $3 is the value to set the --pull flag for docker build; true by default
function
kube::build::docker_build
()
{
function
kube::build::docker_build
()
{
local
-r
image
=
$1
local
-r
image
=
$1
local
-r
context_dir
=
$2
local
-r
context_dir
=
$2
local
-ra
build_cmd
=(
"
${
DOCKER
[@]
}
"
build
-t
"
${
image
}
"
"
${
context_dir
}
"
)
local
-r
pull
=
"
${
3
:-
true
}
"
local
-ra
build_cmd
=(
"
${
DOCKER
[@]
}
"
build
-t
"
${
image
}
"
"--pull=
${
pull
}
"
"
${
context_dir
}
"
)
kube::log::status
"Building Docker image
${
image
}
."
kube::log::status
"Building Docker image
${
image
}
."
local
docker_output
local
docker_output
...
...
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