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.
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user