-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (28 loc) · 909 Bytes
/
Dockerfile
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
# Define base image, you can use --build-arg
ARG base_image="newsdict/rails:ubuntu_20.10_image_v1.2_nvm_v0.38.0_node_v14.17.0_ruby_3.0.1_ffi_1.15.1_sassc_2.4.0_chromedriver_90.0.4430.24"
FROM $base_image
ENV TZ "Asia/Tokyo"
WORKDIR "/app"
# Copy the local files.
COPY . .
# Initialize
RUN \
. /etc/profile && \
# Install the yarn packages and the gems.
yarn install --check-files && \
bundle config --global --delete without && \
bundle config --global --delete frozen && \
bundle install && \
# Update the bin files.
bundle exec rake app:update:bin && \
bundle exec rails webpacker:binstubs && \
bundle exec spring binstub --all && \
# Prepare
bin/rails log:clear && \
bin/rails webpacker:compile && \
bin/rails assets:precompile && \
bin/rails db:seed
CMD ["bash", "/app/entrypoint.sh"]
# Port 80: Application (nginx + puma)
# Port 3035: webpack-dev-server
EXPOSE 80 3035