Skip to content

Commit

Permalink
Merge pull request #5735 from nvandoorn/5523-fix-docker-specs
Browse files Browse the repository at this point in the history
Docker development environment improvements
  • Loading branch information
kennyadsl authored May 3, 2024
2 parents 5e44217 + 1f6b107 commit fdc5e1c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
9 changes: 5 additions & 4 deletions .dockerdev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG RUBY_VERSION
FROM ruby:$RUBY_VERSION-slim-buster
FROM ruby:$RUBY_VERSION-slim-bookworm

ARG PG_VERSION
ARG MYSQL_VERSION
Expand All @@ -14,6 +14,7 @@ RUN apt-get update -qq \
git \
imagemagick \
libvips \
libffi-dev \
libmariadb-dev \
sqlite3 \
libsqlite3-dev \
Expand All @@ -22,10 +23,10 @@ RUN apt-get update -qq \
&& rm -rf /var/cache/apt/lists/*

RUN curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& echo 'deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main' $PG_VERSION > /etc/apt/sources.list.d/pgdg.list
&& echo 'deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main' $PG_VERSION > /etc/apt/sources.list.d/pgdg.list

RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467b942d3a79bd29 \
&& echo "deb http://repo.mysql.com/apt/debian/ buster mysql-"$MYSQL_VERSION > /etc/apt/sources.list.d/mysql.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C \
&& echo "deb http://repo.mysql.com/apt/debian/ bookworm mysql-"$MYSQL_VERSION > /etc/apt/sources.list.d/mysql.list

RUN curl -sSL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash -

Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ group :backend do
gem 'capybara', '~> 3.13', require: false
gem 'capybara-screenshot', '>= 1.0.18', require: false
gem 'selenium-webdriver', require: false
gem 'webdrivers', require: false

# JavaScript testing
gem 'teaspoon', require: false
Expand Down
1 change: 0 additions & 1 deletion admin/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
require "capybara/rspec"
require 'capybara-screenshot/rspec'
require "selenium/webdriver"
require 'webdrivers'
Capybara.save_path = ENV['CIRCLE_ARTIFACTS'] if ENV['CIRCLE_ARTIFACTS']
Capybara.exact = true
Capybara.disable_animation = true
Expand Down
1 change: 0 additions & 1 deletion backend/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
Capybara.exact = true

require "selenium/webdriver"
require 'webdrivers'

Capybara.register_driver :selenium_chrome_headless do |app|
browser_options = ::Selenium::WebDriver::Chrome::Options.new
Expand Down
1 change: 0 additions & 1 deletion backend/spec/teaspoon_env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
ENV['RAILS_ENV'] = 'test'

require 'teaspoon/driver/selenium'
require 'webdrivers'

# Similar to setup described in
# https://github.com/jejacks0n/teaspoon/wiki/Micro-Applications
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ services:
- postgres:/var/lib/postgresql/data:cached

app:
shm_size: '256mb'
build:
context: .dockerdev
dockerfile: Dockerfile
Expand Down

0 comments on commit fdc5e1c

Please sign in to comment.