aws-codebuild-docker-images icon indicating copy to clipboard operation
aws-codebuild-docker-images copied to clipboard

Firefox installation failing in aws/codebuild/standard:5.0 due to compression format change

Open kinesra75 opened this issue 9 months ago • 1 comments

Description When building the aws/codebuild/standard:5.0 image, I encountered a build failure during the Firefox installation step. The issue stems from a change in Firefox's compression format: the downloadable file is now in .xz format rather than .bz2 as expected in the current Dockerfile. Current Behavior The build process downloads Firefox and attempts to extract it using bz2 decompression, which fails because the file is actually in xz format. Steps to Reproduce

Attempt to build the aws/codebuild/standard:5.0 image Observe the failure during Firefox extraction

Proposed Solution The Dockerfile needs to be updated to account for the new compression format:

From:

dockerfileCopyRUN set -ex \
    && curl -L "https://download.mozilla.org/?product=firefox-latest&os=linux64" --output /tmp/FirefoxSetup.tar.bz2 \
    && tar xjf /tmp/FirefoxSetup.tar.bz2 -C /opt/ \
    && ln -s /opt/firefox/firefox /usr/local/bin/firefox \
    && rm -rf /tmp/* \
    && firefox --version

To:

dockerfileCopyRUN set -ex \
    && curl -L "https://download.mozilla.org/?product=firefox-latest&os=linux64" --output /tmp/FirefoxSetup.tar.xz \
    && tar xvf /tmp/FirefoxSetup.tar.xz -C /opt/ \
    && ln -s /opt/firefox/firefox /usr/local/bin/firefox \
    && rm -rf /tmp/* \
    && firefox --version

The changes involve:

Updating the output filename extension from .tar.bz2 to .tar.xz Replacing the xjf flag (for bz2 extraction) with xvf (which will auto-detect the compression)

Thank you for your attention to this matter.

kinesra75 avatar Mar 07 '25 08:03 kinesra75

+1 was also seeing this error

GarrettBeatty avatar Mar 25 '25 14:03 GarrettBeatty