Updates the Dockerfile to use `node:22-alpine` as the base image,
reducing the overall image size and standardizing on Alpine Linux.
Key changes include:
- Replaced `apt-get` with `apk add --no-cache` for package installation.
- Updated package names to their Alpine equivalents (e.g., `libasound2` to `alsa-lib`).
- Switched from manual Chrome/Chromedriver downloads to installing `chromium`
and `chromium-chromedriver` from Alpine repositories.
- Pinned `chromium` and `chromium-chromedriver` to version `136.0.7103.113-r0`
for build consistency.
- Ensured correct ordering for `WORKDIR`, directory creation/permissions,
and `USER node` commands.
I've switched the base image from node:22 to node:22-alpine to reduce image size.
Key changes include:
- Updated FROM instruction to node:22-alpine.
- Replaced apt-get with apk for package management.
- Updated package names to their Alpine equivalents (e.g., libasound2 to alsa-lib, libgtk-4-1 to gtk+3.0).
- Modified Chrome and Chromedriver installation to use Alpine's `chromium` and `chromium-chromedriver` packages instead of manual downloads.
- Ensured correct user, working directory permissions, and order of operations, particularly for directory creation and ownership before switching to the 'node' user.
Note: The Docker image build process encountered an environmental 'no space left on device' error. Therefore, I could not complete full build verification and subsequent functional testing of the image. The Dockerfile changes are based on best practices for Alpine conversion.