File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 8888 - docker#v3.3.0
8989` ` `
9090
91- The subdirectory containing the Dockerfile is the path used for the build's context.
92-
9391# ## Specifying a target step
9492
9593A [multi-stage Docker build] can be used to reduce an application container to
@@ -109,6 +107,22 @@ steps:
109107 - docker#v3.3.0
110108` ` `
111109
110+ # ## Specifying build context
111+
112+ The subdirectory containing the Dockerfile is the path used for the build's context by default.
113+
114+ The `context` property can be used to specify a different path.
115+
116+ ` ` ` yaml
117+ steps:
118+ - command: cargo test
119+ plugins:
120+ - seek-oss/docker-ecr-cache#v1.8.0:
121+ dockerfile: dockerfiles/test/Dockerfile
122+ context: '.'
123+ - docker#v3.3.0
124+ ` ` `
125+
112126# ## Specifying build args
113127
114128[Build-time variables] are supported, either with an explicit value, or without
Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ target="${BUILDKITE_PLUGIN_DOCKER_ECR_CACHE_TARGET:-}"
1414export_env_variable=" ${BUILDKITE_PLUGIN_DOCKER_ECR_CACHE_EXPORT_ENV_VARIABLE:- " BUILDKITE_PLUGIN_DOCKER_IMAGE" } "
1515exec 3>&1
1616tag=" $( compute_tag " ${docker_file} " 2>&3 ) "
17- context=" $( dirname " ${docker_file} " ) "
17+ docker_file_dir=" $( dirname " ${docker_file} " ) "
18+ context=" ${BUILDKITE_PLUGIN_DOCKER_ECR_CACHE_CONTEXT:- " ${docker_file_dir} " } "
1819
1920build_args=()
2021read_build_args
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ configuration:
2323 type : number
2424 export-env-variable :
2525 type : string
26+ context :
27+ type : string
2628 registry-provider :
2729 type : string
2830 gcp-project :
You can’t perform that action at this time.
0 commit comments