Skip to content

Is there a recommended way for installing Chrome and Firefox on CodeBuild? #654

Closed
@trivikr

Description

@trivikr

The ubuntu/standard/5.0 used to install Chrome and Firefox by default.
Dockerfile:

# Install Firefox
RUN set -ex \
&& apt-add-repository -y "deb http://archive.canonical.com/ubuntu $(lsb_release -sc) partner" \
&& apt-get install -y -qq firefox \
&& firefox --version
# Install GeckoDriver
RUN set -ex \
&& apt-get install -y -qq firefox-geckodriver \
&& geckodriver --version
# Install Chrome
RUN set -ex \
&& wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | tee /etc/apt/sources.list.d/google.list \
&& apt-get update \
&& apt-get install -y -qq google-chrome-stable \
&& google-chrome --version

Chrome and Firefox are no longer installed in ubuntu/standard/6.0 and later.
Dockerfile: https://github.com/aws/aws-codebuild-docker-images/blob/master/ubuntu/standard/6.0/Dockerfile

These binaries were useful in running browser tests in the past, and folks who upgrade their CodeBuild versions without explicitly installing Chrome/Firefox binaries will get following errors:

08 06 2023 04:20:42.659:ERROR [launcher]: No binary for ChromeHeadless browser on your platform.
  Please, set "CHROME_BIN" env variable.
08 06 2023 04:20:42.675:ERROR [launcher]: Cannot start Firefox
    Can not find the binary firefox
    Please set env variable FIREFOX_BIN

is there a recommended way for installing Chrome and Firefox on Codebuild?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions