Skip to content

Commit

Permalink
Minor changes to Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mrysav committed Aug 8, 2024
1 parent 94f80d9 commit 3b39f1b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
ARG RUBY_VERSION=3.3.4
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim AS base

# Rails app lives here
WORKDIR /rails
Expand All @@ -12,18 +12,18 @@ ENV RAILS_ENV="production" \
BUNDLE_WITHOUT="development"

# Throw-away build stage to reduce size of final image
FROM base as build
FROM base AS build

# Install packages needed to build gems and node modules
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential git pkg-config libpq-dev libvips curl node-gyp python-is-python3
apt-get install --no-install-recommends -y build-essential git pkg-config libpq-dev libvips curl node-gyp python-is-python3 libjemalloc2

# Install JavaScript dependencies
ARG NODE_VERSION=20.11.1
ARG YARN_VERSION=latest
ENV PATH=/usr/local/node/bin:$PATH
RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && \
/tmp/node-build-master/bin/node-build "${NODE_VERSION}" /usr/local/node && \
/tmp/node-build-master/bin/node-build "${NODE_VERSION}" --verbose /usr/local/node && \
npm install -g yarn@$YARN_VERSION && \
rm -rf /tmp/node-build-master

Expand Down

0 comments on commit 3b39f1b

Please sign in to comment.