forked from desenvolvendo-me/startup-mission-base-rails
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (28 loc) · 911 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
34
FROM ruby:2.7.5
# Install node & yarn
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt-get install -y nodejs
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN apt-get update && apt-get install -y yarn
# Install base deps or additional (e.g. tesseract)
ARG INSTALL_DEPENDENCIES
RUN apt-get update -qq \
&& apt-get install -y --no-install-recommends ${INSTALL_DEPENDENCIES} \
build-essential libpq-dev git libfreetype6-dev gsfonts libmagickwand-dev imagemagick \
&& apt-get clean autoclean \
&& apt-get autoremove -y \
&& rm -rf \
/var/lib/apt \
/var/lib/dpkg \
/var/lib/cache \
/var/lib/log
WORKDIR /app
COPY . .
RUN bundle install
# Install deps Tailwind
RUN rm -rf node_modules && npm install
RUN npm install esbuild
RUN bundle exec rake assets:precompile
RUN bundle exec rake assets:clean
RUN bin/rails tailwindcss:build
EXPOSE 3000