-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDockerfile
28 lines (21 loc) · 867 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
FROM ruby:3.0.2
LABEL maintainer="[email protected]"
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get update && \
apt-get install -y nodejs build-essential
RUN curl -sL 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 && apt-get install yarn
WORKDIR /home/app
COPY .ruby-version Gemfile Gemfile.lock /home/app/
RUN rm -rf ./.git
RUN rm -rf ./working
RUN yes | gem uninstall bundler --all && \
export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ") && \
gem install bundler -v "$BUNDLER_VERSION"
RUN bundle config --global frozen 1 && \
bundle config set deployment 'true' && \
bundle install
COPY . /home/app/
RUN bundle exec rake assets:precompile
ENTRYPOINT ["./entrypoint.sh"]