Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ruby slim image instead of alpine
We are seeing the following error when this Github action is executed: ERROR: glibc-2.34-r0: trying to overwrite etc/nsswitch.conf owned by alpine-baselayout-data-3.2.0-r23. There seems to be a problem when it attempts to install glibc, which is needed as a native dependency for dartsass. This commit resolves this by using a slim image instead of alpine, which already includes the `glibc` package, so it doesn't need to be explicitly installed. We need to install the `build-essential` package so that native gem dependencies are installed successfully. Otherwise we recieve the following error when installing native dependencies for the racc gem, which is a dependency of nokogiri: current directory: /usr/local/bundle/gems/racc-1.7.3/ext/racc/cparse make DESTDIR\= sitearchdir\=./.gem.20231114-7-jo9434 sitelibdir\=./.gem.20231114-7-jo9434 clean current directory: /usr/local/bundle/gems/racc-1.7.3/ext/racc/cparse make DESTDIR\= sitearchdir\=./.gem.20231114-7-jo9434 sitelibdir\=./.gem.20231114-7-jo9434 make failedNo such file or directory - make The `rm -rf /var/lib/apt/lists/*` part will clear the package data and help keep the overall image size small. We are targeting ruby v3.1.4, as this matches the version we currently use in the easol Rails app.
- Loading branch information