forked from hackclub/hackatime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
36 lines (30 loc) · 863 Bytes
/
Copy pathDockerfile.dev
File metadata and controls
36 lines (30 loc) · 863 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
FROM ruby:3.4.3
# Install system dependencies
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 \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives
# Set working directory
WORKDIR /app
# 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
# Start the main process
CMD ["rails", "server", "-b", "0.0.0.0"]