-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathDockerfile.dev
More file actions
48 lines (39 loc) · 1015 Bytes
/
Dockerfile.dev
File metadata and controls
48 lines (39 loc) · 1015 Bytes
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
FROM ruby:4.0.1-bookworm
# Install basic Linux packages
RUN apt-get update -qq && apt-get install -y \
build-essential \
git \
curl \
default-libmysqlclient-dev \
libvips \
tzdata \
libxml2-dev \
libxslt1-dev \
libffi-dev \
libreadline-dev \
libssl-dev \
zlib1g-dev \
nodejs \
npm \
default-mysql-client
# Set working directory
WORKDIR /app
# Install bundler
# RUN gem install bundler -v 4.0.4
# Speed up bundling by caching Gemfile layer
ENV BUNDLE_PATH=/usr/local/bundle \
BUNDLE_BIN=/usr/local/bundle/bin \
GEM_HOME=/usr/local/bundle
ENV PATH="$BUNDLE_BIN:$PATH"
COPY Gemfile Gemfile.lock package.json package-lock.json ./
RUN npm ci
RUN bundle install
# Bring in the rest of the app (still useful for initial build cache)
COPY . .
# Rails dev defaults
ENV RAILS_ENV=development
ENV NODE_ENV=development
# Expose port (default Rails)
EXPOSE 3000
# Start the server (customize to your app server if needed)
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]