Skip to content

Commit cd424f5

Browse files
authored
Usnet Docker Build Ctx and Filepath if 'CTF_*_IMAGE' env vars are used (#2220)
1 parent f47ecdf commit cd424f5

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

framework/.changeset/v0.11.8.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Usnet Docker Build Ctx and Filepath if `CTF_*_IMAGE` env vars are used

framework/components/jd/jd.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ func NewWithContext(ctx context.Context, in *Input) (*Output, error) {
7979
defaults(in)
8080
jdImg := os.Getenv("CTF_JD_IMAGE")
8181
if jdImg != "" {
82+
// unset docker build context and file path to avoid conflicts, image provided via env var takes precedence
8283
in.Image = jdImg
84+
in.DockerContext = ""
85+
in.DockerFilePath = ""
8386
}
8487
if in.WSRPCPort == WSRPCHealthPort {
8588
return nil, fmt.Errorf("wsrpc port cannot be the same as wsrpc health port")

framework/components/simple_node_set/node_set.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ func sharedDBSetup(ctx context.Context, in *Input, bcOut *blockchain.Output) (*O
171171

172172
if envImage != "" {
173173
nodeSpec.Node.Image = envImage
174+
// unset docker build context and file path to avoid conflicts, image provided via env var takes precedence
175+
nodeSpec.Node.DockerContext = ""
176+
nodeSpec.Node.DockerFilePath = ""
174177
}
175178

176179
dbURLHost := strings.Replace(dbOut.Url, "/chainlink?sslmode=disable", fmt.Sprintf("/db_%d?sslmode=disable", i), -1)

0 commit comments

Comments
 (0)