Closed paul-norman closed 2 years ago
Hi @paul-norman, thanks for the detailed report! I just merged #14 which adds an FAQ for Alpine Linux to the README, but after reading your note I wonder if it should be updated to highlight some of the issues you pointed out. Would you be able to send a PR?
The bash requirement comes from the wrapper script we use to ensure that we don't leave behind zombie processes when running as a watcher in a Phoenix app. I am not sure if the wrapper script can be written without the bash requirement, but I will look into it, thanks!
On newer alpine images we use this:
ENV GLIBC_VERSION=2.34-r0
COPY docker/sgerrand.rsa.pub /etc/apk/keys/sgerrand.rsa.pub
RUN wget -q -O /tmp/glibc.apk https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk && \
mv /etc/nsswitch.conf /etc/nsswitch.conf.bak && \
apk add --no-cache --force-overwrite /tmp/glibc.apk && \
mv /etc/nsswitch.conf.bak /etc/nsswitch.conf && \
rm -rf /tmp/glibc.apk
set version to latest GLIBC_VERSION=2.35-r1
if you encounter this error:
ERROR: glibc-2.34-r0: trying to overwrite etc/nsswitch.conf owned by alpine-baselayout-data-3.4.3-r2
I recently tried out Elixir for the first time yesterday and decided to use an Alpine Linux Docker container for this test (as I do with many things that I try out). I wanted to add SASS support to Phoenix, but I didn't really want an entire Node ecosystem tagged on and lacked the Elixir understanding to do it myself. I found this project and it is great! Well done!
However, sadly my journey wasn't straight forward (details below) and it might be worth noting in the docs somewhere that this project requires
bash
andglibc
(neither of which ship with Alpine or some other distros). In fact, apparently usingglibc
on Alpine is very naughty and the project that I used to add it to my (dev-only) container is rather unsafe (or at best unpredictable).Details on what happens without these dependencies follows. My only error on boot (interspersed with many other messages) was:
(no indication that this had anything to do with SASS) and when I added
bash
it became:Which is absolutely untrue, that file existed in my
_build
directory.After some searching, I found that SASS relied upon
gclib
, so I added that in the clunkiest way possible (since Alpine usesmusl
):And only then did the system build my CSS file.