Answer the question
In order to leave comments, you need to log in
Is nodejs visible or not visible inside the docker container?
I run the compiled image based on the official ruby: 2.5.3, go to its console and do:
[email protected]#node -v
v.8.15.0
[email protected]#RAILS_ENV=staging bundle exec rake assets:precompile
Compiling…
Compilation failed:
/usr/local/bin/ruby: warning: shebang line ending with \r may cause problems
warning package.json: No license field
/usr/bin/env: 'node\r': No such file or directory
[email protected]# which node
/usr/local/bin/node
FROM ruby:2.5.3
ENV APP_HOME /project
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
COPY ./Gemfile $APP_HOME
COPY ./Gemfile.lock $APP_HOME
ENV BUNDLE_PATH /bundle
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install -y nodejs imagemagick jpegoptim optipng unzip
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt-get install yarn
RUN bundle install --without development test --jobs 4
RUN gem install foreman
RUN yarn install
CMD tail -f /dev/null
Answer the question
In order to leave comments, you need to log in
warning: shebang line ending with \r may cause problems
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question