お世話になっております。

下記の問題について知見がある方がいらっしゃいましたらご教示お願いします。

起きている問題

AWS環境でnginxunicornmysqldockerコンテナで構築しdocker-compose run app rails assets:precompile実行時に、Yarn executable was not detected in the system.と表示される。

$ docker-compose run app rails assets:precompile
Starting coffee_app_db_1 ... done
Yarn executable was not detected in the system.

試したこと

**yarn**がインストールされていないとのことなので、**Dockerfile**に追記。

FROM ruby:2.5.1
RUN apt-get update -qq && \
    apt-get install -y apt-utils \
                       build-essential \
                       libpq-dev \
                       nodejs \
                       default-mysql-client \
                       yarn ※ここを追記
:

docker-compose build成功後、docker-compose run app rails assets:precompileで同様のエラーが発生してしまいます。

コンテナに入ってyarnをインストール

で『Yarn Executable was not Detected in The System.』|teratail
7.00 GEEK