rojopolis / spellcheck-github-actions

Spell check action
MIT License
138 stars 38 forks source link

Multi-stage build of Docker image has issues with aspell installation #57

Closed jonasbn closed 2 years ago

jonasbn commented 3 years ago

Currently this is patched via PR #56 addressing issue #55.

But the problem is still there and something in the multi-stage build does not work as expected.

edumco commented 3 years ago

I believe it must be related to the instalation of the languages not the aspell itself

On the first image you install aspell with this code

RUN apt-get update && apt-get install -y \
    aspell \
    && rm -rf /var/lib/apt/lists/*

On the second image you parse the ARG

$(echo "$SPELLCHECK_LANGS" | sed 's/,/ /g' | xargs printf -- 'aspell-%s\n') 

So the final command became

RUN apt-get update && apt-get install -y \
    aspell \
    aspell-en aspell-de

This forces the install of the languages as system packages. So you should do it on the first image.