hometown-mastodon/Dockerfile

64 lines
1.5 KiB
Text
Raw Normal View History

2022-11-08 09:05:24 +00:00
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.15
ARG BUILD_DATE
ARG VERSION
2023-04-06 22:17:08 +01:00
ARG MASTODON_VERSION
LABEL build_version="dev.cat-enby.club version:- ${VERSION} Build-date:- ${BUILD_DATE}"
2022-12-03 15:34:49 +00:00
LABEL maintainer="Nikurasu"
2022-11-08 09:05:24 +00:00
ENV RAILS_ENV="production" \
NODE_ENV="production" \
2022-11-15 09:27:16 +00:00
PATH="${PATH}:/app/www/bin"
2022-11-08 09:05:24 +00:00
RUN \
apk add -U --upgrade --no-cache \
ffmpeg \
file \
icu-libs \
imagemagick \
libpq \
libidn \
nodejs \
ruby \
ruby-bundler \
yarn && \
apk add --no-cache --virtual=build-dependencies \
build-base \
g++ \
gcc \
icu-dev \
libidn-dev \
libpq-dev \
libxml2-dev \
libxslt-dev \
openssl-dev \
npm \
ruby-dev && \
echo "**** install mastodon ****" && \
mkdir -p /app/www && \
curl -s -o \
/tmp/mastodon.tar.gz -L \
2023-04-06 22:17:08 +01:00
"https://codeberg.org/nikurasu/mastodon/archive/main.tar.gz" && \
2022-11-08 09:05:24 +00:00
tar xf \
/tmp/mastodon.tar.gz -C \
/app/www/ --strip-components=1 && \
cd /app/www && \
bundle config set --local deployment 'true' && \
bundle config set --local without 'development test' && \
bundle config set silence_root_warning true && \
bundle install -j"$(nproc)" && \
yarn install --pure-lockfile && \
OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
yarn cache clean && \
rm -rf \
/tmp/*
COPY root/ /
EXPOSE 80 443
VOLUME /config