Skip to content

Instantly share code, notes, and snippets.

@Exagone313
Created November 19, 2023 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Exagone313/be23566e2c8eee3cabf97073be4302fb to your computer and use it in GitHub Desktop.
Save Exagone313/be23566e2c8eee3cabf97073be4302fb to your computer and use it in GitHub Desktop.
Mastodon patched Docker image
#!/bin/sh
podman build --format docker -t ghcr.io/exagone313/mastodon:v4.1.10 .
podman push ghcr.io/exagone313/mastodon:v4.1.10
FROM ghcr.io/mastodon/mastodon:v4.1.10
RUN sed -i 's/500/2048/g' app/javascript/mastodon/features/compose/components/compose_form.js && \
sed -i 's/500/2048/g' app/validators/status_length_validator.rb && \
sed -i 's/300/2048/g' app/models/rule.rb
# ---
# Code below is copied from the end of https://github.com/mastodon/mastodon/blob/v4.1.10/Dockerfile
# ---
# Set the run user
USER mastodon
WORKDIR /opt/mastodon
# Precompile assets
RUN OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && \
yarn cache clean
# Set the work dir and the container entry point
ENTRYPOINT ["/usr/bin/tini", "--"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment