mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-27 02:24:03 -05:00
Install from nvmrc during devcontainer Dockerfile build (#30603)
This commit is contained in:
parent
c1a84f1b5b
commit
6952af137d
@ -1,17 +1,15 @@
|
|||||||
# For details, see https://github.com/devcontainers/images/tree/main/src/ruby
|
# For details, see https://github.com/devcontainers/images/tree/main/src/ruby
|
||||||
FROM mcr.microsoft.com/devcontainers/ruby:1-3.3-bookworm
|
FROM mcr.microsoft.com/devcontainers/ruby:1-3.3-bookworm
|
||||||
|
|
||||||
# Update existing node version, keep in sync with .nvmrc
|
# Install node version from .nvmrc
|
||||||
ARG NODE_VERSION="20"
|
WORKDIR /app
|
||||||
RUN . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1
|
COPY .nvmrc .
|
||||||
|
RUN /bin/bash --login -i -c "nvm install"
|
||||||
|
|
||||||
# Install additional OS packages
|
# Install additional OS packages
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
export DEBIAN_FRONTEND=noninteractive && \
|
export DEBIAN_FRONTEND=noninteractive && \
|
||||||
apt-get -y install --no-install-recommends libicu-dev libidn11-dev ffmpeg imagemagick libvips42 libpam-dev
|
apt-get -y install --no-install-recommends libicu-dev libidn11-dev ffmpeg imagemagick libvips42 libpam-dev
|
||||||
|
|
||||||
# Install global node packages
|
|
||||||
RUN . /usr/local/share/nvm/nvm.sh && corepack enable 2>&1
|
|
||||||
|
|
||||||
# Move welcome message to where VS Code expects it
|
# Move welcome message to where VS Code expects it
|
||||||
COPY welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt
|
COPY .devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt
|
||||||
|
@ -2,8 +2,8 @@ services:
|
|||||||
app:
|
app:
|
||||||
working_dir: /workspaces/mastodon/
|
working_dir: /workspaces/mastodon/
|
||||||
build:
|
build:
|
||||||
context: .
|
context: ..
|
||||||
dockerfile: Dockerfile
|
dockerfile: .devcontainer/Dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
- ..:/workspaces/mastodon:cached
|
- ..:/workspaces/mastodon:cached
|
||||||
environment:
|
environment:
|
||||||
|
@ -18,7 +18,7 @@ FileUtils.chdir APP_ROOT do
|
|||||||
system('bundle check') || system!('bundle install')
|
system('bundle check') || system!('bundle install')
|
||||||
|
|
||||||
puts "\n== Installing JS dependencies =="
|
puts "\n== Installing JS dependencies =="
|
||||||
system! 'corepack prepare'
|
system! 'corepack enable'
|
||||||
system! 'bin/yarn install --immutable'
|
system! 'bin/yarn install --immutable'
|
||||||
|
|
||||||
puts "\n== Preparing database =="
|
puts "\n== Preparing database =="
|
||||||
|
Loading…
Reference in New Issue
Block a user