-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
44 lines (35 loc) · 990 Bytes
/
Copy pathDockerfile.dev
File metadata and controls
44 lines (35 loc) · 990 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
# syntax = docker/dockerfile:1
ARG RUBY_VERSION=3.2.2
FROM docker.io/library/ruby:$RUBY_VERSION-slim
# Install dependencies
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y \
build-essential \
curl \
git \
libjemalloc2 \
libvips \
nodejs \
pkg-config \
sqlite3 && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives
# Install Node.js
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs
# Set up the application directory
WORKDIR /rails
# Set development environment
ENV RAILS_ENV="development" \
BUNDLE_PATH="/usr/local/bundle" \
BUNDLE_WITHOUT=""
# Install gems
COPY Gemfile Gemfile.lock ./
RUN bundle install
# Copy application code
COPY . .
# Add a script to be executed every time the container starts
COPY entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
# Start the main process
CMD ["rails", "server", "-b", "0.0.0.0"]