Skip to content

Commit

Permalink
add http proxy buildAgrs
Browse files Browse the repository at this point in the history
  • Loading branch information
Trolldemorted committed Jul 19, 2024
1 parent d34b0ae commit 2877f0d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions service/backend/service/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,19 @@ func (docker *DockerService) BuildImage() {
log.Fatal(err, " :unable to create tar")
}

httpProxy := "http://proxy.prod.bambi.ovh:3128"
buildArgs := make(map[string]*string)
buildArgs["http_proxy"] = &httpProxy
buildArgs["https_proxy"] = &httpProxy
buildArgs["HTTP_PROXY"] = &httpProxy
buildArgs["HTTPS_PROXY"] = &httpProxy
opts := dockerTypes.ImageBuildOptions{
Dockerfile: "Dockerfile",
Tags: []string{docker.ImgTag},
Remove: true,
// ForceRemove: true,
// NoCache: true,
BuildArgs: buildArgs,
}

res, err := docker.Client.ImageBuild(docker.Context, tar, opts)
Expand Down

0 comments on commit 2877f0d

Please sign in to comment.