cameradar icon indicating copy to clipboard operation
cameradar copied to clipboard

Add GOPROXY in Dockerfile

Open Droid-MAX opened this issue 2 years ago • 4 comments

It is recommended to add the following code in the Dockerfile:

ENV GOPROXY=https://goproxy.io,direct

At line 16.

Droid-MAX avatar Sep 02 '21 14:09 Droid-MAX

Hi @Droid-MAX.

Says who? The website of goproxy.io doesn't even give any good reason to use their proxy over not using it. They just say they promise they won't make your builds worse by having a 99.99% SLA. So why would it be recommended to do that?

If you explain to me why it is a good idea, we can consider it. But so far, it seems like "the most trusted Go module proxy in China" is not what this project needs at the moment.

Ullaakut avatar Sep 02 '21 18:09 Ullaakut

You are right. When building a docker image in a Chinese network environment, some golang packages cannot be downloaded, resulting in build errors, so I suggest adding the GOPROXY environment variable.

Droid-MAX avatar Sep 02 '21 23:09 Droid-MAX

And why does the cameradar built with the latest version of the source code do not support the -o parameter?

Droid-MAX avatar Sep 03 '21 02:09 Droid-MAX

Hi @Droid-MAX,

You are right. When building a docker image in a Chinese network environment, some golang packages cannot be downloaded, resulting in build errors, so I suggest adding the GOPROXY environment variable.

I know that this project is heavily used by the Chinese community, but if this is an issue, setting a proxy is as easy as using the -e option when running the build Dockerfile to set a proxy.

Since this project is usually built only by individual users, and by me when I make a release (happens quite rarely these days), this does not feel like it would add any value to the project at the moment.

And why does the cameradar built with the latest version of the source code do not support the -o parameter?

What do you mean? If you found a bug with this option, please create a dedicated GitHub issue for it, I'd love to help you with it if there's indeed a regression on that option.

Thanks :)

Ullaakut avatar Sep 03 '21 06:09 Ullaakut