Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GOPROXY in Dockerfile #292

Open
Droid-MAX opened this issue Sep 2, 2021 · 4 comments
Open

Add GOPROXY in Dockerfile #292

Droid-MAX opened this issue Sep 2, 2021 · 4 comments
Assignees

Comments

@Droid-MAX
Copy link

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

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

At line 16.

@Ullaakut Ullaakut self-assigned this Sep 2, 2021
@Ullaakut
Copy link
Owner

Ullaakut commented Sep 2, 2021

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.

@Droid-MAX
Copy link
Author

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
Copy link
Author

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

@Ullaakut
Copy link
Owner

Ullaakut commented Sep 3, 2021

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants