-
Notifications
You must be signed in to change notification settings - Fork 196
/
Copy pathDockerfile.dev
50 lines (38 loc) · 996 Bytes
/
Dockerfile.dev
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
FROM neeto/ruby-3.2.4:node18.12
ENV APP_PATH /var/app
ENV BUNDLE_VERSION 2.2.32
ENV RAILS_PORT 3000
ENV LAUNCHY_DRY_RUN true
ENV BROWSER /dev/null
ENV BUNDLE_PATH /usr/local/bundle
ENV GEM_PATH /usr/local/bundle
ENV GEM_HOME /usr/local/bundle
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# install dependencies for M1 Macs
RUN apk add --update --no-cache curl py-pip python3
# install dependencies for application
RUN apk -U add --no-cache \
make \
gcc \
build-base \
git \
postgresql-dev \
postgresql-client \
libxml2-dev \
libxslt-dev \
nodejs-current \
npm \
yarn \
tzdata \
&& rm -rf /var/cache/apk/* \
&& mkdir -p $APP_PATH
RUN gem install bundler --version "$BUNDLE_VERSION"
# navigate to app directory
WORKDIR $APP_PATH
COPY Gemfile Gemfile.lock ./
COPY package.json yarn.lock ./
RUN bundle check || bundle install --jobs=8
RUN yarn install --check-files
COPY . .
EXPOSE $RAILS_PORT