aerokube / images

Browser images for Selenoid and Moon 1.x
https://aerokube.com/images/latest/
Apache License 2.0
168 stars 126 forks source link

Fail to build chrome 116 beta #633

Open lionelnicolas opened 1 year ago

lionelnicolas commented 1 year ago

Using the latest commit of images ( 2c0aed65e4ba1324acdb7c2d0b1decbad3948ed1 ), building chrome 115 stable works but not chrome 116 beta:

Working:

#~ images chrome --channel stable --browser 115.0.5790.110-1 --tag selenoid/chrome:115.0

Not working:

#~ images chrome --channel beta --browser 116.0.5845.50-1 --tag selenoid/chrome:116.0-beta
command error: parse chromedriver version: could not find compatible chromedriver

@vania-pooh Please note that parsing seems to work when I remove the trailing .50-1 from the version number, but then apt fails to install the package since the version isn't correct.

lionelnicolas commented 1 year ago

Also, I don't know if that's expected, but when building image v115.0, images is downloading chromedriver v114:

naming to docker.io/selenoid/dev_chrome:115.0.5790.110 done

2023/08/02 09:33:06 downloading driver from https://chromedriver.storage.googleapis.com/114.0.5735.90/chromedriver_linux64.zip
 7.06 MiB / 7.06 MiB  100.00% 0s
2023/08/02 09:33:06 running command: docker build -t selenoid/chrome:115.0 --build-arg VERSION=115.0.5790.110 --label driver=chromedriver:114.0.5735.90 /tmp/images3974799981/chrome
vania-pooh commented 1 year ago

@lionelnicolas are you using recent source code?

lionelnicolas commented 1 year ago

Yes I'm using 2c0aed65e4ba1324acdb7c2d0b1decbad3948ed1

lionelnicolas commented 1 year ago

If that's helpful, here is the dockerfile I'm using to build it:

FROM golang:1.20.5-buster as builder

WORKDIR /opt/app

ENV \
    GIT_REFSPEC=2c0aed65e4ba1324acdb7c2d0b1decbad3948ed1 \
    GOOS=linux \
    GOARCH=amd64 \
    CGO_ENABLED=0

RUN \
    curl -fSL https://github.com/aerokube/images/archive/${GIT_REFSPEC}.tar.gz | tar -zx --strip-components=1

RUN \
    go install github.com/markbates/pkger/cmd/pkger && \
    go generate github.com/aerokube/images && \
    go build -ldflags "-X github.com/aerokube/images/cmd.buildStamp=$(date -u '+%Y-%m-%d_%I:%M:%S%p') -X github.com/aerokube/images/cmd.gitRevision=${GIT_REFSPEC} -s -w"