diff --git a/Dockerfile b/Dockerfile index 665a1bea46..6c07a60a3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,8 @@ FROM node:${NODE_VERSION} as build COPY --link --from=ruby /opt/ruby /opt/ruby ENV DEBIAN_FRONTEND="noninteractive" \ - PATH="${PATH}:/opt/ruby/bin" + PATH="${PATH}:/opt/ruby/bin" \ + NODE_OPTIONS=--openssl-legacy-provider SHELL ["/bin/bash", "-o", "pipefail", "-c"] @@ -50,11 +51,12 @@ ENV RAILS_ENV="production" \ # Precompile assets # TODO(kouhai): we're currently patching node_modules because of emoji-mart. # we should integrate our own fork instead. -COPY ./emoji_data/all.json ./node_modules/emoji-mart/data/all.json +COPY --link . /opt/mastodon ENV OTP_SECRET=precompile_placeholder \ SECRET_KEY_BASE=precompile_placeholder \ RAKE_NO_YARN_INSTALL_HACK=1 -RUN bundle exec rails assets:precompile +RUN mv ./emoji_data/all.json ./node_modules/emoji-mart/data/all.json && \ + bundle exec rails assets:precompile FROM node:${NODE_VERSION} @@ -97,7 +99,6 @@ RUN apt-get update && \ # Note: no, cleaning here since Debian does this automatically # See the file /etc/apt/apt.conf.d/docker-clean within the Docker image's filesystem -COPY --link --chown=mastodon:mastodon . /opt/mastodon COPY --link --chown=mastodon:mastodon --from=build /opt/mastodon /opt/mastodon ENV RAILS_ENV="production" \