-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
27 lines (22 loc) · 1.11 KB
/
Dockerfile.dev
File metadata and controls
27 lines (22 loc) · 1.11 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
FROM ruby:3.2.3
ENV LANG C.UTF-8
ENV TZ Asia/Tokyo
RUN apt-get update -qq \
&& apt-get install -y ca-certificates curl gnupg cron build-essential libssl-dev vim \
&& mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& NODE_MAJOR=20 \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update -qq && apt-get install -y nodejs yarn
WORKDIR /myapp
# Gemfileとyarn.lockのみを先にコピーして依存関係をインストール
COPY Gemfile Gemfile.lock ./
RUN gem install bundler -v 2.5.9 && bundle install
COPY package.json yarn.lock ./
RUN yarn install --check-files
# アプリケーションのコードをコピー
COPY . .
# アセットのプリコンパイル(必要に応じて)
RUN yarn build && yarn build:css