update ruby version
This commit is contained in:
@@ -1,18 +1,22 @@
|
||||
# Primary image
|
||||
FROM mcr.microsoft.com/devcontainers/ruby:1-3.2-bookworm
|
||||
FROM mcr.microsoft.com/devcontainers/base:debian-12
|
||||
|
||||
# apt caching & install packages
|
||||
RUN rm -f /etc/apt/apt.conf.d/docker-clean; \
|
||||
RUN rm -f /etc/apt/apt.conf.d/docker-clean && \
|
||||
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
|
||||
RUN \
|
||||
--mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
apt-get update && \
|
||||
apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
apt-get install --no-install-recommends --no-install-suggests -qqy \
|
||||
libicu-dev \
|
||||
abiword \
|
||||
autoconf \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
curl \
|
||||
ffmpeg \
|
||||
ffmpegthumbnailer \
|
||||
gnupg \
|
||||
iputils-ping \
|
||||
libblas-dev \
|
||||
@@ -25,18 +29,18 @@ RUN \
|
||||
libncurses5-dev \
|
||||
libpq-dev \
|
||||
libreadline6-dev \
|
||||
libreoffice \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
libvips42 \
|
||||
libyaml-dev \
|
||||
patch \
|
||||
uuid-dev \
|
||||
zlib1g-dev \
|
||||
watchman \
|
||||
ffmpeg \
|
||||
ffmpegthumbnailer \
|
||||
abiword \
|
||||
pdftohtml \
|
||||
libreoffice
|
||||
pkg-config \
|
||||
rustc \
|
||||
uuid-dev \
|
||||
watchman \
|
||||
zlib1g-dev
|
||||
|
||||
# Install postgres 15 client
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
@@ -44,8 +48,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
sudo install -d /usr/share/postgresql-common/pgdg && \
|
||||
curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc && \
|
||||
sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \
|
||||
apt update && \
|
||||
apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
sudo apt update && \
|
||||
sudo apt-get install --no-install-recommends --no-install-suggests -qqy \
|
||||
postgresql-client-15
|
||||
|
||||
# Install & configure delta diff tool
|
||||
@@ -63,22 +67,36 @@ RUN git config --system core.pager "delta" && \
|
||||
git config --system diff.algorithm "histogram" && \
|
||||
git config --system diff.colorMoved "default"
|
||||
|
||||
# Install ruby
|
||||
USER vscode
|
||||
RUN git clone https://github.com/rbenv/rbenv.git ~/.rbenv
|
||||
ENV PATH="/home/vscode/.rbenv/bin:/home/vscode/.rbenv/shims:$PATH"
|
||||
RUN echo 'eval "$(rbenv init - --no-rehash bash)"' >> ~/.bashrc
|
||||
RUN git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
|
||||
RUN rbenv install 3.4.4 && \
|
||||
rbenv global 3.4.4
|
||||
|
||||
ENV RAILS_ENV development
|
||||
|
||||
# [Optional] Uncomment this line to install additional gems.
|
||||
RUN su vscode -c "gem install bundler -v '2.5.6'" && \
|
||||
su vscode -c "gem install rake -v '13.0.6'" && \
|
||||
su vscode -c "gem install ruby-lsp -v '0.22.1'"
|
||||
# Pre install gems to speed up container startup
|
||||
USER root
|
||||
RUN mkdir -p /tmp/bundle-install-cache && \
|
||||
chown -R vscode:vscode /tmp/bundle-install-cache
|
||||
WORKDIR /tmp/bundle-install-cache
|
||||
USER vscode
|
||||
COPY Gemfile.lock Gemfile ./
|
||||
COPY gems/has_aux_table ./gems/has_aux_table
|
||||
RUN BUNDLE_FROZEN=true MAKE="make -j$(nproc)" bundle install --jobs $(nproc)
|
||||
|
||||
# install exo
|
||||
RUN su vscode -c "curl -sL https://exo.deref.io/install | bash"
|
||||
RUN curl -sL https://exo.deref.io/install | bash
|
||||
ENV PATH "/home/vscode/.exo/bin:$PATH"
|
||||
|
||||
# install just (command runner)
|
||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin
|
||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | sudo bash -s -- --to /usr/local/bin
|
||||
|
||||
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install 18 && nvm use 18 && npm install -g yarn" 2>&1
|
||||
ENV PATH /usr/local/share/nvm/current/bin:$PATH
|
||||
# RUN source /usr/local/share/nvm/nvm.sh && nvm install 18 && nvm use 18 && npm install -g yarn 2>&1
|
||||
# ENV PATH /usr/local/share/nvm/current/bin:$PATH
|
||||
|
||||
# install `backlog` tool
|
||||
RUN su vscode -c "npm i -g backlog.md"
|
||||
# # install `backlog` tool
|
||||
# RUN npm i -g backlog.md
|
||||
|
||||
@@ -7,7 +7,26 @@
|
||||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
|
||||
"features": {
|
||||
"ghcr.io/meaningful-ooo/devcontainer-features/fish:1": {},
|
||||
"ghcr.io/nikobockerman/devcontainer-features/fish-persistent-data:2": {}
|
||||
"ghcr.io/nikobockerman/devcontainer-features/fish-persistent-data:2": {},
|
||||
"ghcr.io/devcontainers-extra/features/npm-package:1": {
|
||||
"package": "backlog.md"
|
||||
}
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"Shopify.ruby-extensions-pack",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"aliariff.vscode-erb-beautify",
|
||||
"bradlc.vscode-tailwindcss",
|
||||
"KoichiSasada.vscode-rdbg",
|
||||
"qwtel.sqlite-viewer",
|
||||
"esbenp.prettier-vscode",
|
||||
"ms-azuretools.vscode-docker",
|
||||
"1YiB.rust-bundle",
|
||||
"rust-lang.rust-analyzer"
|
||||
]
|
||||
}
|
||||
},
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// This can be used to network with other containers or the host.
|
||||
|
||||
@@ -5,6 +5,8 @@ services:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: .devcontainer/Dockerfile.devcontainer
|
||||
ssh:
|
||||
- default
|
||||
volumes:
|
||||
- ../..:/workspaces:cached
|
||||
- ./fish-shell-conf-d:/home/vscode/.config/fish/conf.d
|
||||
@@ -12,6 +14,7 @@ services:
|
||||
- devcontainer-redux-blob-files:/mnt/blob_files_development
|
||||
- /tank/redux-data/blob_files_production:/mnt/blob_files_production
|
||||
environment:
|
||||
SSH_AUTH_SOCK: ${SSH_AUTH_SOCK}
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4318
|
||||
OTEL_SERVICE_NAME: redux-scraper-dev
|
||||
OTEL_RESOURCE_ATTRIBUTES: application=redux-scraper-dev
|
||||
|
||||
1
.devcontainer/fish-shell-conf-d/rbenv.fish
Normal file
1
.devcontainer/fish-shell-conf-d/rbenv.fish
Normal file
@@ -0,0 +1 @@
|
||||
status --is-interactive; and rbenv init - --no-rehash fish | source
|
||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "gems/has_aux_table"]
|
||||
path = gems/has_aux_table
|
||||
url = ssh://git@git.dy.mk:2221/dymk/has_aux_table.git
|
||||
@@ -1 +1 @@
|
||||
system
|
||||
3.4.4
|
||||
|
||||
15
Dockerfile
15
Dockerfile
@@ -1,5 +1,5 @@
|
||||
# Primary image
|
||||
FROM ruby:3.2.6
|
||||
FROM ruby:3.4.4
|
||||
USER root
|
||||
|
||||
# apt caching & install packages
|
||||
@@ -14,10 +14,10 @@ RUN \
|
||||
libblas-dev liblapack-dev
|
||||
|
||||
# preinstall gems that take a long time to install
|
||||
RUN MAKE="make -j12" gem install bundler -v '2.5.6' --verbose
|
||||
RUN MAKE="make -j12" gem install rice -v '4.3.3' --verbose
|
||||
RUN MAKE="make -j12" gem install faiss -v '0.3.2' --verbose
|
||||
RUN MAKE="make -j12" gem install rails_live_reload -v '0.3.6' --verbose
|
||||
RUN MAKE="make -j12" gem install bundler -v '2.6.7'
|
||||
RUN MAKE="make -j12" gem install rice -v '4.3.3'
|
||||
RUN MAKE="make -j12" gem install faiss -v '0.3.2'
|
||||
RUN MAKE="make -j12" gem install rails_live_reload -v '0.3.6'
|
||||
RUN bundle config --global frozen 1
|
||||
|
||||
# set up nodejs 18.x deb repo
|
||||
@@ -46,9 +46,8 @@ RUN \
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
COPY Gemfile Gemfile.lock ./
|
||||
RUN echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config
|
||||
RUN bundle config --local frozen 1
|
||||
RUN --mount=type=ssh bundle install
|
||||
COPY gems/has_aux_table ./gems/has_aux_table
|
||||
RUN ls -lah gems && BUNDLE_FROZEN=true MAKE="make -j$(nproc)" bundle install --jobs $(nproc)
|
||||
|
||||
# install js dependencies
|
||||
COPY package.json yarn.lock ./
|
||||
|
||||
9
Gemfile
9
Gemfile
@@ -1,20 +1,17 @@
|
||||
source "https://rubygems.org"
|
||||
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
||||
|
||||
ruby "~> 3.2"
|
||||
ruby "~> 3"
|
||||
gem "bundler", "~> 2.6.7"
|
||||
|
||||
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
|
||||
gem "rails", "~> 7.2"
|
||||
gem "has_aux_table",
|
||||
git: "ssh://git@git.dy.mk:2221/dymk/has_aux_table.git",
|
||||
branch: "main"
|
||||
gem "has_aux_table", path: "gems/has_aux_table"
|
||||
|
||||
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
|
||||
gem "sprockets-rails"
|
||||
|
||||
# Use sqlite3 as the database for Active Record
|
||||
gem "pg"
|
||||
gem "sqlite3", "~> 1.4"
|
||||
|
||||
gem "pry"
|
||||
gem "pry-stack_explorer"
|
||||
|
||||
28
Gemfile.lock
28
Gemfile.lock
@@ -24,10 +24,8 @@ GIT
|
||||
railties
|
||||
websocket-driver
|
||||
|
||||
GIT
|
||||
remote: ssh://git@git.dy.mk:2221/dymk/has_aux_table.git
|
||||
revision: fb7912e3536c339cba55af54c3e647f69f5997f3
|
||||
branch: main
|
||||
PATH
|
||||
remote: gems/has_aux_table
|
||||
specs:
|
||||
has_aux_table (0.1.0)
|
||||
activerecord (>= 7.0)
|
||||
@@ -212,16 +210,22 @@ GEM
|
||||
fugit (>= 1.11.0)
|
||||
railties (>= 6.1.0)
|
||||
thor (>= 1.0.0)
|
||||
google-protobuf (4.29.2-aarch64-linux)
|
||||
google-protobuf (4.31.1-aarch64-linux-gnu)
|
||||
bigdecimal
|
||||
rake (>= 13)
|
||||
google-protobuf (4.29.2-arm64-darwin)
|
||||
google-protobuf (4.31.1-aarch64-linux-musl)
|
||||
bigdecimal
|
||||
rake (>= 13)
|
||||
google-protobuf (4.29.2-x86_64-darwin)
|
||||
google-protobuf (4.31.1-arm64-darwin)
|
||||
bigdecimal
|
||||
rake (>= 13)
|
||||
google-protobuf (4.29.2-x86_64-linux)
|
||||
google-protobuf (4.31.1-x86_64-darwin)
|
||||
bigdecimal
|
||||
rake (>= 13)
|
||||
google-protobuf (4.31.1-x86_64-linux-gnu)
|
||||
bigdecimal
|
||||
rake (>= 13)
|
||||
google-protobuf (4.31.1-x86_64-linux-musl)
|
||||
bigdecimal
|
||||
rake (>= 13)
|
||||
htmlbeautifier (1.4.3)
|
||||
@@ -589,10 +593,6 @@ GEM
|
||||
actionpack (>= 6.1)
|
||||
activesupport (>= 6.1)
|
||||
sprockets (>= 3.0.0)
|
||||
sqlite3 (1.7.3-aarch64-linux)
|
||||
sqlite3 (1.7.3-arm64-darwin)
|
||||
sqlite3 (1.7.3-x86_64-darwin)
|
||||
sqlite3 (1.7.3-x86_64-linux)
|
||||
stackprof (0.2.26)
|
||||
stimulus-rails (1.3.4)
|
||||
railties (>= 6.0.0)
|
||||
@@ -669,6 +669,7 @@ DEPENDENCIES
|
||||
addressable
|
||||
attr_json
|
||||
bootsnap
|
||||
bundler (~> 2.6.7)
|
||||
capybara
|
||||
charlock_holmes
|
||||
cloudflare-rails
|
||||
@@ -742,7 +743,6 @@ DEPENDENCIES
|
||||
spring-commands-parallel-tests
|
||||
spring-commands-rspec
|
||||
sprockets-rails
|
||||
sqlite3 (~> 1.4)
|
||||
stackprof
|
||||
stimulus-rails
|
||||
syntax_tree (~> 6.2)
|
||||
@@ -762,4 +762,4 @@ RUBY VERSION
|
||||
ruby 3.2.6p234
|
||||
|
||||
BUNDLED WITH
|
||||
2.6.2
|
||||
2.6.7
|
||||
|
||||
1
gems/has_aux_table
Submodule
1
gems/has_aux_table
Submodule
Submodule gems/has_aux_table added at fb7912e353
Reference in New Issue
Block a user