From f9869d4b3d82c53fc9ffe61198b76232693f6e5e Mon Sep 17 00:00:00 2001 From: Vladimir D Date: Wed, 16 Oct 2024 18:52:48 +0400 Subject: [PATCH] Dockerfile tidying up --- Dockerfile | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9def885..a063417 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,5 @@ -ARG MASTODON_VERSION=4.3.0 -ARG MASTODON_VERSION_PRERELEASE="" -ARG MASTODON_VERSION_METADATA="" - FROM cloudron/base:4.2.0@sha256:46da2fffb36353ef714f97ae8e962bd2c212ca091108d768ba473078319a47f4 as build -ARG MASTODON_VERSION - RUN mkdir -p /app/code /app/pkg WORKDIR /app/code @@ -177,16 +171,17 @@ RUN ./configure \ FROM build +# renovate: datasource=github-releases depName=tootsuite/mastodon versioning=semver extractVersion=^v(?.+)$ +ARG MASTODON_VERSION=4.3.0 +ARG MASTODON_VERSION_PRERELEASE="" +ARG MASTODON_VERSION_METADATA="" + ENV RAILS_ENV production ENV NODE_ENV production ARG RAILS_SERVE_STATIC_FILES="true" ARG RUBY_YJIT_ENABLE="1" ENV \ - MASTODON_VERSION=${MASTODON_VERSION} \ -# Apply Mastodon version information - MASTODON_VERSION_PRERELEASE="${MASTODON_VERSION_PRERELEASE}" \ - MASTODON_VERSION_METADATA="${MASTODON_VERSION_METADATA}" \ # Apply Mastodon static files and YJIT options RAILS_SERVE_STATIC_FILES=${RAILS_SERVE_STATIC_FILES} \ RUBY_YJIT_ENABLE=${RUBY_YJIT_ENABLE} \ @@ -211,7 +206,6 @@ RUN ldconfig && \ ffmpeg -version && \ ffprobe -version -# renovate: datasource=github-releases depName=tootsuite/mastodon versioning=semver extractVersion=^v(?.+)$ RUN curl -L https://github.com/tootsuite/mastodon/archive/v${MASTODON_VERSION}.tar.gz | tar -xz --strip-components 1 -f - && \ bundle config --local set deployment 'true' && \ bundle config --local set without 'development test' && \ @@ -223,7 +217,7 @@ RUN curl -L https://github.com/tootsuite/mastodon/archive/v${MASTODON_VERSION}.t RUN corepack enable && \ corepack prepare --activate -RUN yarn workspaces focus --production @mastodon/mastodon; +RUN yarn workspaces focus --production @mastodon/mastodon RUN yarn install # Use Ruby on Rails to create Mastodon assets @@ -258,4 +252,3 @@ RUN ln -fs /app/data/system /app/code/public/system COPY start.sh cleanup.sh config.sh env.template cache-env.sh.template /app/pkg/ CMD [ "/app/pkg/start.sh" ] -