-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.dev
More file actions
57 lines (44 loc) · 1.25 KB
/
Copy pathDockerfile.dev
File metadata and controls
57 lines (44 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM ruby:3.4.4
ENV DEBIAN_FRONTEND=noninteractive
ENV RAILS_ENV=development
ENV NODE_ENV=development
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
# Install system dependencies
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends \
build-essential \
git \
curl \
libpq-dev \
libvips \
libvips-dev \
libvips-tools \
postgresql-client \
locales \
&& rm -rf /var/lib/apt/lists/*
# Set up locale
RUN locale-gen en_US.UTF-8
# Install Node.js 20.x
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs
# Install Yarn via Corepack
RUN corepack enable && \
corepack prepare yarn@4.9.1 --activate
# Set working directory
WORKDIR /app
# Install Bundler
RUN gem install bundler
# Copy dependency files
COPY Gemfile Gemfile.lock ./
COPY package.json yarn.lock ./
# Install Ruby gems (without production/test groups for faster installs)
RUN bundle config set --local without 'production' && \
bundle install --jobs 4 --retry 3
# Install Node dependencies
RUN yarn install
# Copy entrypoint script
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["sleep", "infinity"]