diff --git a/Dockerfile b/Dockerfile index 6a7fd11..e55a54f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM phusion/baseimage:0.11 +FROM phusion/baseimage:jammy-1.0.1 # Use baseimage-docker's init system. CMD ["/sbin/my_init"] @@ -14,6 +14,7 @@ ENV \ RAILS_SERVE_STATIC_FILES=true \ RAILS_ENV=production \ NODE_ENV=production \ + DEBIAN_FRONTEND=noninteractive \ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/mastodon/app/bin ARG UID=991 @@ -22,7 +23,13 @@ ARG GID=991 # this repo master maps to upstream master, branches in this repo # map to specific upstream commits that are released as versions ARG REPO_URL=https://github.com/tootsuite/mastodon.git -ARG REPO_REV=master +# main branch as of 2022-11-26 +ARG REPO_REV=95b24c51ece406ee50a67c9682fd5bd887d927e5 +# specified in repo +ARG RUBY_VERSION=3.0.4 + + +RUN apt update && apt install -y curl jq # install os prereq stuff to image ADD prereqs.sh /tmp/prereqs.sh @@ -52,6 +59,3 @@ RUN chmod +x /etc/service/streaming/run VOLUME /state EXPOSE 3000 4000 - -LABEL maintainer="Jeffrey Paul " \ - description="Your self-hosted, globally interconnected microblogging community" diff --git a/install.sh b/install.sh index 8bb6d25..e6056b7 100644 --- a/install.sh +++ b/install.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -x + export PATH="$HOME/.rbenv/bin:$PATH" export RUBY_CONFIGURE_OPTS="--with-jemalloc" @@ -9,8 +11,8 @@ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> $HOME/.bashrc echo 'eval "$(rbenv init -)"' >> $HOME/.bashrc git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build eval "$(rbenv init -)" -rbenv install 2.6.5 -rbenv global 2.6.5 +rbenv install $RUBY_VERSION +rbenv global $RUBY_VERSION gem update --system gem install bundler --no-document diff --git a/prereqs.sh b/prereqs.sh index 273e14b..5554e5e 100644 --- a/prereqs.sh +++ b/prereqs.sh @@ -5,23 +5,25 @@ set -x export DEBIAN_FRONTEND=noninteractive MRUM="main restricted universe multiverse" -M="mirror://mirrors.ubuntu.com/mirrors.txt" +COUNTRY="$(curl ipinfo.io | jq -r .country)" +#M="mirror://mirrors.ubuntu.com/mirrors.txt" +M="http://$COUNTRY.archive.ubuntu.com/ubuntu" +R="$(lsb_release -cs)" cat > /etc/apt/sources.list </dev/null +echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | tee /etc/apt/sources.list.d/yarn.list apt update @@ -34,11 +36,11 @@ apt install -y \ file \ g++ \ gcc \ - git-core \ + git \ imagemagick \ libffi-dev \ libgdbm-dev \ - libgdbm5 \ + libgdbm6 \ libicu-dev \ libidn11-dev \ libjemalloc-dev \