-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
41 lines (29 loc) · 829 Bytes
/
Dockerfile.dev
File metadata and controls
41 lines (29 loc) · 829 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
FROM ruby:3.4.5-slim
ENV TZ=America/Sao_Paulo
ENV INSTALL_PATH=/app
ARG USER_ID=1000
ARG GROUP_ID=1000
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
libpq-dev \
libyaml-dev \
imagemagick \
tzdata \
curl \
nano \
git \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd -g $GROUP_ID appuser && \
useradd -u $USER_ID -g appuser -m -s /bin/bash appuser
WORKDIR $INSTALL_PATH
RUN chown -R appuser:appuser $INSTALL_PATH
ENV BUNDLE_PATH=/usr/local/bundle
RUN mkdir -p /usr/local/bundle && chown -R appuser:appuser /usr/local/bundle
USER appuser
COPY --chown=appuser:appuser Gemfile Gemfile.lock ./
RUN bundle install
COPY --chown=appuser:appuser . .
EXPOSE 3000
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]