From 3d5183e99c851ef97107407ec0f85fe9e31240bf Mon Sep 17 00:00:00 2001 From: Daigo 3 Dango Date: Fri, 9 Jul 2021 23:29:27 +0000 Subject: Use ruby-2.7.4 (#16481) Stop using older version of resolv gem as the bug has been fixed. https://bugs.ruby-lang.org/issues/17781 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 962e5a8c9..8279e8735 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,7 @@ RUN ARCH= && \ mv node-v$NODE_VER-linux-$ARCH /opt/node # Install Ruby -ENV RUBY_VER="2.7.2" +ENV RUBY_VER="2.7.4" RUN apt-get update && \ apt-get install -y --no-install-recommends build-essential \ bison libyaml-dev libgdbm-dev libreadline-dev libjemalloc-dev \ -- cgit From 229f5d1681577c60e2aa0ab7240c5115acd9434a Mon Sep 17 00:00:00 2001 From: Shlee Date: Wed, 11 Aug 2021 04:56:13 +0800 Subject: NodeJS 14 support - circleci/docker/.nvmrc (#16163) * Update config.yml * Update Dockerfile * Update .nvmrc * Update Dockerfile * NodeJS 10 is EOL. * Update package.json * Update README.md * Update Vagrantfile * Update Dockerfile * Update Dockerfile --- .circleci/config.yml | 2 +- .nvmrc | 2 +- Dockerfile | 4 ++-- Vagrantfile | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'Dockerfile') diff --git a/.circleci/config.yml b/.circleci/config.yml index 42c058295..bfded07de 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -209,7 +209,7 @@ jobs: test-webui: <<: *defaults docker: - - image: circleci/node:12-buster + - image: circleci/node:14-buster steps: - *attach_workspace - run: diff --git a/.nvmrc b/.nvmrc index 48082f72f..8351c1939 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -12 +14 diff --git a/Dockerfile b/Dockerfile index 8279e8735..fb596fdbf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,8 @@ FROM ubuntu:20.04 as build-dep # Use bash for the shell SHELL ["/bin/bash", "-c"] -# Install Node v12 (LTS) -ENV NODE_VER="12.21.0" +# Install Node v14 (LTS) +ENV NODE_VER="14.17.4" RUN ARCH= && \ dpkgArch="$(dpkg --print-architecture)" && \ case "${dpkgArch##*-}" in \ diff --git a/Vagrantfile b/Vagrantfile index 4d0cc0f76..82d41f7d5 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -12,7 +12,7 @@ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - sudo apt-add-repository 'deb https://dl.yarnpkg.com/debian/ stable main' # Add repo for NodeJS -curl -sL https://deb.nodesource.com/setup_12.x | sudo bash - +curl -sL https://deb.nodesource.com/setup_14.x | sudo bash - # Add firewall rule to redirect 80 to PORT and save sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port #{ENV["PORT"]} -- cgit From 12cb6ed46167bf62ceade2a16e55e233a90f13d4 Mon Sep 17 00:00:00 2001 From: Shlee Date: Tue, 14 Sep 2021 01:03:14 +0800 Subject: Update Dockerfile (#16696) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index fb596fdbf..0b88b49a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM ubuntu:20.04 as build-dep SHELL ["/bin/bash", "-c"] # Install Node v14 (LTS) -ENV NODE_VER="14.17.4" +ENV NODE_VER="14.17.6" RUN ARCH= && \ dpkgArch="$(dpkg --print-architecture)" && \ case "${dpkgArch##*-}" in \ -- cgit From f68772fd6a019b1ff21fe89e87ab0626817e62bb Mon Sep 17 00:00:00 2001 From: David Sterry Date: Thu, 14 Oct 2021 12:00:38 -0700 Subject: add bundle flag to suppress root warning (#16557) --- Dockerfile | 1 + 1 file changed, 1 insertion(+) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 0b88b49a8..ab29e79b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,6 +56,7 @@ COPY Gemfile* package.json yarn.lock /opt/mastodon/ RUN cd /opt/mastodon && \ bundle config set deployment 'true' && \ bundle config set without 'development test' && \ + bundle config set silence_root_warning true && \ bundle install -j"$(nproc)" && \ yarn install --pure-lockfile -- cgit From 03338d12979c55ea2986416b9518b3a6e469a299 Mon Sep 17 00:00:00 2001 From: Shlee Date: Wed, 17 Nov 2021 17:57:01 +1100 Subject: [Dockerfile] [Security] Update NodeJS to V16 (LTS) on docker. (#16856) * [Security] Update NodeJS on docker. https://nodejs.org/en/blog/vulnerability/oct-2021-security-releases/ * Update Dockerfile * Upgrade npm package * Update Dockerfile --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index ab29e79b8..483f5e79a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,8 @@ FROM ubuntu:20.04 as build-dep # Use bash for the shell SHELL ["/bin/bash", "-c"] -# Install Node v14 (LTS) -ENV NODE_VER="14.17.6" +# Install Node v16 (LTS) +ENV NODE_VER="16.13.0" RUN ARCH= && \ dpkgArch="$(dpkg --print-architecture)" && \ case "${dpkgArch##*-}" in \ @@ -45,7 +45,8 @@ RUN apt-get update && \ ENV PATH="${PATH}:/opt/ruby/bin:/opt/node/bin" -RUN npm install -g yarn && \ +RUN npm install -g npm@latest && \ + npm install -g yarn && \ gem install bundler && \ apt-get update && \ apt-get install -y --no-install-recommends git libicu-dev libidn11-dev \ -- cgit From c242c1d87ae0655da2f03b4e09a50bdbb183912b Mon Sep 17 00:00:00 2001 From: Shlee Date: Fri, 19 Nov 2021 07:59:57 +1100 Subject: Ruby 3.0.2 Upgrade (#16982) * Update .ruby-version * Update Gemfile * Update Gemfile.lock * Update Dockerfile * Update check-i18n.yml * Update config.yml * Update config.yml --- .circleci/config.yml | 12 ++++++------ .github/workflows/check-i18n.yml | 2 +- .ruby-version | 2 +- Dockerfile | 4 ++-- Gemfile | 1 + Gemfile.lock | 1 + 6 files changed, 12 insertions(+), 10 deletions(-) (limited to 'Dockerfile') diff --git a/.circleci/config.yml b/.circleci/config.yml index 968de1eb2..e3e4f83d9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,7 @@ executors: environment: POSTGRES_USER: root POSTGRES_HOST_AUTH_METHOD: trust - - image: circleci/redis:5-alpine + - image: circleci/redis:6-alpine commands: install-system-dependencies: @@ -45,7 +45,7 @@ commands: bundle config without 'development production' name: Set bundler settings - ruby/install-deps: - bundler-version: '2.2.29' + bundler-version: '2.2.31' key: ruby<< parameters.ruby-version >>-gems-v1 wait-db: steps: @@ -56,14 +56,14 @@ commands: jobs: build: docker: - - image: cimg/ruby:2.7-node + - image: cimg/ruby:3.0-node environment: RAILS_ENV: test steps: - checkout - install-system-dependencies - install-ruby-dependencies: - ruby-version: '2.7' + ruby-version: '3.0' - node/install-packages: cache-version: v1 pkg-manager: yarn @@ -111,12 +111,12 @@ jobs: test-migrations: executor: name: default - ruby-version: '2.7' + ruby-version: '3.0' steps: - checkout - install-system-dependencies - install-ruby-dependencies: - ruby-version: '2.7' + ruby-version: '3.0' - wait-db - run: command: ./bin/rails db:create diff --git a/.github/workflows/check-i18n.yml b/.github/workflows/check-i18n.yml index 398e78b0f..2e8f230f3 100644 --- a/.github/workflows/check-i18n.yml +++ b/.github/workflows/check-i18n.yml @@ -22,7 +22,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: '2.7' + ruby-version: '3.0' bundler-cache: true - name: Check locale file normalization run: bundle exec i18n-tasks check-normalized diff --git a/.ruby-version b/.ruby-version index a4dd9dba4..b50214693 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.4 +3.0.2 diff --git a/Dockerfile b/Dockerfile index 483f5e79a..af1d55cb7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,8 +25,8 @@ RUN ARCH= && \ rm node-v$NODE_VER-linux-$ARCH.tar.gz && \ mv node-v$NODE_VER-linux-$ARCH /opt/node -# Install Ruby -ENV RUBY_VER="2.7.4" +# Install Ruby 3.0 +ENV RUBY_VER="3.0.2" RUN apt-get update && \ apt-get install -y --no-install-recommends build-essential \ bison libyaml-dev libgdbm-dev libreadline-dev libjemalloc-dev \ diff --git a/Gemfile b/Gemfile index 81b340201..a420f0577 100644 --- a/Gemfile +++ b/Gemfile @@ -4,6 +4,7 @@ source 'https://rubygems.org' ruby '>= 2.5.0', '< 3.1.0' gem 'pkg-config', '~> 1.4' +gem 'rexml', '~> 3.2' gem 'puma', '~> 5.5' gem 'rails', '~> 6.1.4' diff --git a/Gemfile.lock b/Gemfile.lock index e36a1cbbd..31dade486 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -758,6 +758,7 @@ DEPENDENCIES rdf-normalize (~> 0.4) redis (~> 4.5) redis-namespace (~> 1.8) + rexml (~> 3.2) rqrcode (~> 2.1) rspec-rails (~> 5.0) rspec-sidekiq (~> 3.1) -- cgit From d647f6ad0496db6725b2ac7bb6da55d69cdab3f4 Mon Sep 17 00:00:00 2001 From: Shlee Date: Fri, 19 Nov 2021 08:00:38 +1100 Subject: Update Dockerfile (#16939) --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index af1d55cb7..f5de24210 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,7 @@ FROM ubuntu:20.04 as build-dep # Use bash for the shell SHELL ["/bin/bash", "-c"] +RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections # Install Node v16 (LTS) ENV NODE_VER="16.13.0" @@ -18,7 +19,7 @@ RUN ARCH= && \ esac && \ echo "Etc/UTC" > /etc/localtime && \ apt-get update && \ - apt-get install -y --no-install-recommends ca-certificates wget python && \ + apt-get install -y --no-install-recommends ca-certificates wget python apt-utils && \ cd ~ && \ wget -q https://nodejs.org/download/release/v$NODE_VER/node-v$NODE_VER-linux-$ARCH.tar.gz && \ tar xf node-v$NODE_VER-linux-$ARCH.tar.gz && \ @@ -83,11 +84,12 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # Install mastodon runtime deps +RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections RUN apt-get update && \ apt-get -y --no-install-recommends install \ libssl1.1 libpq5 imagemagick ffmpeg libjemalloc2 \ libicu66 libprotobuf17 libidn11 libyaml-0-2 \ - file ca-certificates tzdata libreadline8 gcc tini && \ + file ca-certificates tzdata libreadline8 gcc tini apt-utils && \ ln -s /opt/mastodon /mastodon && \ gem install bundler && \ rm -rf /var/cache && \ -- cgit From 46e62fc4b33f3566eb9bf588b15bac28cae967a3 Mon Sep 17 00:00:00 2001 From: zunda Date: Wed, 24 Nov 2021 19:29:05 +0000 Subject: Upgrade Ruby to 3.0.3 (#17038) https://www.ruby-lang.org/en/news/2021/11/24/ruby-3-0-3-released/ --- .ruby-version | 2 +- Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Dockerfile') diff --git a/.ruby-version b/.ruby-version index b50214693..75a22a26a 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0.2 +3.0.3 diff --git a/Dockerfile b/Dockerfile index f5de24210..309ec06f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ RUN ARCH= && \ mv node-v$NODE_VER-linux-$ARCH /opt/node # Install Ruby 3.0 -ENV RUBY_VER="3.0.2" +ENV RUBY_VER="3.0.3" RUN apt-get update && \ apt-get install -y --no-install-recommends build-essential \ bison libyaml-dev libgdbm-dev libreadline-dev libjemalloc-dev \ -- cgit From fad37dd1bc8504fe6f2939f5d935cc1e5d264458 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Sun, 26 Dec 2021 06:52:24 +0900 Subject: Save bundle config as local (#17188) Some bundle options are saved as global user config and not project local. Specially, `deployment` must be saved as local config to be run on copied environment --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 309ec06f4..590b6eddf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,8 +56,8 @@ RUN npm install -g npm@latest && \ COPY Gemfile* package.json yarn.lock /opt/mastodon/ RUN cd /opt/mastodon && \ - bundle config set deployment 'true' && \ - bundle config set without 'development test' && \ + 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 -- cgit From aa45404578f3f4bc61742b0bda7111b520491100 Mon Sep 17 00:00:00 2001 From: Daniel Jakots Date: Sun, 30 Jan 2022 18:32:03 -0500 Subject: Bump NODE_VER to 16.13.2, to solve security issues (#17399) Fixes CVE-2021-44532, CVE-2021-44533, and CVE-2022-21824. See: https://nodejs.org/en/blog/vulnerability/jan-2022-security-releases/ --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 590b6eddf..c6287b5a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ SHELL ["/bin/bash", "-c"] RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections # Install Node v16 (LTS) -ENV NODE_VER="16.13.0" +ENV NODE_VER="16.13.2" RUN ARCH= && \ dpkgArch="$(dpkg --print-architecture)" && \ case "${dpkgArch##*-}" in \ -- cgit