mastodon (songbird)

Published 2024-03-10 12:32:47 +09:00 by namekuji

Installation

docker pull dev.waah.day/namekuji/mastodon:songbird
sha256:3fad2a955168069bd8cdb49cf7fc823490bbfc3198d0b60a37455d358501056a

Image Layers

ADD file:eb6a3def1f69e76655620640e610015f285bc23c97e89855feb1f0548309d518 in /
CMD ["bash"]
RUN /bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends bzip2 ca-certificates libffi-dev libgmp-dev libssl-dev libyaml-dev procps zlib1g-dev ; rm -rf /var/lib/apt/lists/* # buildkit
RUN /bin/sh -c set -eux; mkdir -p /usr/local/etc; { echo 'install: --no-document'; echo 'update: --no-document'; } >> /usr/local/etc/gemrc # buildkit
ENV LANG=C.UTF-8
ENV RUBY_VERSION=3.2.3
ENV RUBY_DOWNLOAD_URL=https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.3.tar.xz
ENV RUBY_DOWNLOAD_SHA256=cfb231954b8c241043a538a4c682a1cca0b2016d835fee0b9e4a0be3ceba476b
RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends bison dpkg-dev libgdbm-dev ruby autoconf g++ gcc libbz2-dev libgdbm-compat-dev libglib2.0-dev libncurses-dev libreadline-dev libxml2-dev libxslt-dev make wget xz-utils ; rm -rf /var/lib/apt/lists/*; rustArch=; dpkgArch="$(dpkg --print-architecture)"; case "$dpkgArch" in 'amd64') rustArch='x86_64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-gnu/rustup-init'; rustupSha256='0b2f6c8f85a3d02fde2efc0ced4657869d73fccfce59defb4e8d29233116e6db' ;; 'arm64') rustArch='aarch64-unknown-linux-gnu'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-gnu/rustup-init'; rustupSha256='673e336c81c65e6b16dcdede33f4cc9ed0f08bde1dbe7a935f113605292dc800' ;; esac; if [ -n "$rustArch" ]; then mkdir -p /tmp/rust; wget -O /tmp/rust/rustup-init "$rustupUrl"; echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; chmod +x /tmp/rust/rustup-init; export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; export PATH="$CARGO_HOME/bin:$PATH"; /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; rustc --version; cargo --version; fi; wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; mkdir -p /usr/src/ruby; tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; rm ruby.tar.xz; cd /usr/src/ruby; { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new; mv file.c.new file.c; autoconf; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; ./configure --build="$gnuArch" --disable-install-doc --enable-shared ${rustArch:+--enable-yjit} ; make -j "$(nproc)"; make install; rm -rf /tmp/rust; apt-mark auto '.*' > /dev/null; apt-mark manual $savedAptMark > /dev/null; find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' | sort -u | xargs -r dpkg-query --search | cut -d: -f1 | sort -u | xargs -r apt-mark manual ; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; cd /; rm -r /usr/src/ruby; if dpkg -l | grep -i ruby; then exit 1; fi; [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; ruby --version; gem --version; bundle --version # buildkit
ENV GEM_HOME=/usr/local/bundle
ENV BUNDLE_SILENCE_ROOT_WARNING=1 BUNDLE_APP_CONFIG=/usr/local/bundle
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN /bin/sh -c mkdir -p "$GEM_HOME" && chmod 1777 "$GEM_HOME" # buildkit
CMD ["irb"]
ARG MASTODON_VERSION_PRERELEASE=
ARG MASTODON_VERSION_METADATA=
ARG RAILS_SERVE_STATIC_FILES=true
ARG RUBY_YJIT_ENABLE=1
ARG TZ=Etc/UTC
ARG UID=991
ARG GID=991
ENV MASTODON_VERSION_PRERELEASE= MASTODON_VERSION_METADATA= RAILS_SERVE_STATIC_FILES=true RUBY_YJIT_ENABLE=1 TZ=Etc/UTC
ENV BIND=0.0.0.0 NODE_ENV=production RAILS_ENV=production DEBIAN_FRONTEND=noninteractive PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/ruby/bin:/opt/mastodon/bin MALLOC_CONF=narenas:2,background_thread:true,thp:never,dirty_decay_ms:1000,muzzy_decay_ms:0
SHELL [/bin/bash -o pipefail -o errexit -c]
ARG TARGETPLATFORM
RUN |8 MASTODON_VERSION_PRERELEASE= MASTODON_VERSION_METADATA= RAILS_SERVE_STATIC_FILES=true RUBY_YJIT_ENABLE=1 TZ=Etc/UTC UID=991 GID=991 TARGETPLATFORM=linux/amd64 /bin/bash -o pipefail -o errexit -c echo "Target platform is $TARGETPLATFORM" # buildkit
RUN |8 MASTODON_VERSION_PRERELEASE= MASTODON_VERSION_METADATA= RAILS_SERVE_STATIC_FILES=true RUBY_YJIT_ENABLE=1 TZ=Etc/UTC UID=991 GID=991 TARGETPLATFORM=linux/amd64 /bin/bash -o pipefail -o errexit -c rm -f /etc/apt/apt.conf.d/docker-clean; echo "${TZ}" > /etc/localtime; groupadd -g "${GID}" mastodon; useradd -l -u "${UID}" -g "${GID}" -m -d /opt/mastodon mastodon; ln -s /opt/mastodon /mastodon; # buildkit
WORKDIR /opt/mastodon
RUN |8 MASTODON_VERSION_PRERELEASE= MASTODON_VERSION_METADATA= RAILS_SERVE_STATIC_FILES=true RUBY_YJIT_ENABLE=1 TZ=Etc/UTC UID=991 GID=991 TARGETPLATFORM=linux/amd64 /bin/bash -o pipefail -o errexit -c apt-get update; apt-get dist-upgrade -yq; apt-get install -y --no-install-recommends ca-certificates curl ffmpeg file imagemagick libjemalloc2 patchelf procps tini tzdata wget ; patchelf --add-needed libjemalloc.so.2 /usr/local/bin/ruby; apt-get purge -y patchelf ; # buildkit
ARG TARGETPLATFORM
RUN |1 TARGETPLATFORM=linux/amd64 /bin/bash -o pipefail -o errexit -c apt-get update; apt-get install -y --no-install-recommends libssl3 libpq5 libicu72 libidn12 libreadline8 libyaml-0-2 ; # buildkit
COPY . /opt/mastodon/ # buildkit
COPY /opt/mastodon/public/packs /opt/mastodon/public/packs # buildkit
COPY /opt/mastodon/public/assets /opt/mastodon/public/assets # buildkit
COPY /usr/local/bundle/ /usr/local/bundle/ # buildkit
RUN |1 TARGETPLATFORM=linux/amd64 /bin/bash -o pipefail -o errexit -c bundle exec bootsnap precompile --gemfile app/ lib/; # buildkit
RUN |1 TARGETPLATFORM=linux/amd64 /bin/bash -o pipefail -o errexit -c curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs && corepack enable && corepack prepare --activate && yarn install # buildkit
RUN |1 TARGETPLATFORM=linux/amd64 /bin/bash -o pipefail -o errexit -c mkdir -p /opt/mastodon/public/system; chown mastodon:mastodon /opt/mastodon/public/system; chown -R mastodon:mastodon /opt/mastodon/tmp; # buildkit
USER mastodon
EXPOSE map[3000/tcp:{}]
ENTRYPOINT ["/usr/bin/tini" "--"]

Labels

Key Value
com.docker.compose.project songbird
com.docker.compose.service streaming
com.docker.compose.version 2.24.7
Details
Container
2024-03-10 12:32:47 +09:00
2
OCI / Docker
linux/amd64
914 MiB
Versions (1) View all
songbird 2024-03-10