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
x509: certificate signed by unknown authority #871
Comments
git clean Remove untracked files from the working tree |
git bisect Use binary search to find the commit that introduced a bug |
@Oneartwe I have no idea what this is from or for, but your issue above looks like an issue with Go, and nothing to do with |
@davidzhongsydney I don't know your use case, but generally speaking, it's not a good idea to build go app using the |
@ZekeLu I know how to pull and run from golang image. But I am not sure how "copy the output to the chromedp/headless-shell image". Would you be able to show me how the docker command looks like please? Thanks. |
@kenshaw I also tried on ubuntu image. Manually install golang and test the helloworld. It is all good. docker run -it --name ubuntucontainer ubuntu |
go get -x -insecure github.com/chromedp/chromedp command works fine under my Windows development environment. Does the Linux docker image missing the CA certificate? |
@ZekeLu As you advised, I used golang:alpine image, [ go get -x github.com/chromedp/chromedp] is execuated without error. But chromedp by default will use headless as bowser. But does not installed. As you mentioned, "copy the output to the chromedp/headless-shell image". Could you please let me know how to copy the headless to the golang:alpine image? Thanks. 2021/07/11 04:52:58 exec: "google-chrome": executable file not found in $PATH |
Here is an example
Please read https://docs.docker.com/develop/develop-images/multistage-build/ for more information. |
@ZekeLu Thanks for your advice. I used the method you recommended. Docker image can be successfully created. However, when I run the docker image, it report "Failed to load GLES library".
Then I run the image directly from https://github.com/chromedp/docker-headless-shell. It also report error. Is the image itself has problem?
|
|
the root cause of starting the chromedp/headless-shell image is there is no libraries below. However, these two lib can be found under /headless-shell/. After mkdir /headless-shell/swiftshader and copy the so files into dir, and retart the container. Error is resolved.
|
@davidzhongsydney Good job! But please note that When you run When I run
But this is not a blocking error. I have used it in production environment without any issue. |
@ZekeLu It works now. Thanks. |
@ZekeLu each time when the container restarted, it listen on different url. How did you program get this dynamic url? Is there some way to make the URL static? Thanks. |
If you manually launch chrome, you need to specify the port it listens on. I believe the modern versions of chrome choose a random port. You can specify this via command line options, which can be used with the |
Oh, forgot to answer this question. I don't think we can make the URL static. For now, the Lines 275 to 279 in e43a192
And Lines 35 to 43 in e43a192
|
em~~~back to my previous question. Since the URL that headless listen on is unknow until it is running in the container, how the golang program can capture this URL? Right now what I did is
It would be better if the golang can capture the listen URL rather than being hardcoded |
@davidzhongsydney It seems that you missed this comment #871 (comment). Please do read #817. |
@ZekeLu Great! My problem is resolved. |
@ZekeLu Thanks very much. |
go install in docker image report x509: certificate signed by unknown
What versions are you running?
uname -r
5.4.72-microsoft-standard-WSL2
cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
$ go list -m github.com/chromedp/chromedp
go: github.com/chromedp/chromedp@v0.6.10: missing go.sum entry; to add it:
go mod download github.com/chromedp/chromedp
$ google-chrome --version
sh: 137: google-chrome: not found
$ go version
go version go1.16.5 linux/amd64
What did you do? Include clear steps.
docker pull chromedp/headless-shell:74.0.3717.1
//download go1.16.5.linux-amd64.tar.gz and put into local /goinstall directoy
docker run -v ${PWD}/goinstall/:/tmp/ -d --name chromedpcontainer chromedp/headless-shell
docker exec -it sh
cd /tmp
tar -C /usr/local -xzf go1.16.5.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
cd /tmp
go mod init helloworld
go get -x github.com/chromedp/chromedp
What did you expect to see?
github.com/chromedp/chromedp installed. below added into go.mod
require (
github.com/chromedp/chromedp v0.6.10
)
What did you see instead?
go: github.com/chromedp/chromedp@v0.6.10: Get "https://proxy.golang.org/github.com/chromedp/chromedp/@v/v0.6.10.mod": x509: certificate signed by unknown authority
The text was updated successfully, but these errors were encountered: