-
Notifications
You must be signed in to change notification settings - Fork 123
Expand file tree
/
Copy pathDockerfile.dev
More file actions
55 lines (46 loc) · 1.39 KB
/
Dockerfile.dev
File metadata and controls
55 lines (46 loc) · 1.39 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
FROM ruby:3.4.8
# Install system dependencies including Node.js
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y \
build-essential \
git \
libpq-dev \
libyaml-dev \
postgresql-client \
libvips \
pkg-config \
curl \
vim \
nodejs \
npm \
chromium \
chromium-driver \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives
# Install Bun
RUN curl -fsSL https://bun.sh/install | bash && \
mv ~/.bun/bin/bun /usr/local/bin/
# Set working directory
WORKDIR /app
# Install npm dependencies for Vite. Vendored Inertia packages must exist
# before `bun install` because they are referenced via local file dependencies.
COPY package.json bun.lock ./
COPY vendor/inertia vendor/inertia
RUN bun install
# Install application dependencies
COPY Gemfile Gemfile.lock ./
RUN bundle install
# Add a script to be executed every time the container starts
COPY entrypoint.dev.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.dev.sh
ENTRYPOINT ["entrypoint.dev.sh"]
# Global git safeguards
RUN git config --system http.timeout 30 && \
git config --system http.lowSpeedLimit 1000 && \
git config --system http.lowSpeedTime 10
EXPOSE 3000
EXPOSE 3036
# Disable dev warnings
RUN bundle exec skylight disable_dev_warning
RUN bundle config set default_cli_command install --global
# Start the main process
CMD ["rails", "server", "-b", "0.0.0.0"]