Skip to content

Instantly share code, notes, and snippets.

@r3cha
Created May 11, 2020 04:55
Show Gist options
  • Save r3cha/d0cd9fd91bfa37345a471cf360b317ff to your computer and use it in GitHub Desktop.
Save r3cha/d0cd9fd91bfa37345a471cf360b317ff to your computer and use it in GitHub Desktop.
FROM node:current-alpine3.11 as node
FROM ruby:2.6.5-alpine3.11 as build-base
COPY --from=node /usr/local/bin/node /usr/local/bin/
COPY --from=node /opt/yarn-v1.22.0 /opt/yarn-v1.22.0
RUN ln -s /usr/local/bin/node /usr/local/bin/nodejs
RUN ln -s /opt/yarn-v1.22.0/bin/yarn /usr/local/bin/yarn
RUN ln -s /opt/yarn-v1.22.0/bin/yarnpkg /usr/local/bin/yarnpkg
RUN apk update && apk add --no-cache \
git \
libwebp \
postgresql-client \
tzdata \
imagemagick \
make \
g++
RUN node --version
RUN mkdir -p /app
WORKDIR /app
RUN echo "install: --no-rdoc --no-ri" >> ~/.gemrc
RUN echo "update: --no-rdoc --no-ri" >> ~/.gemrc
RUN gem update --system
RUN gem install bundler:2.1.4
# not bundle docs
RUN bundle config --global jobs $(nproc --all)
COPY . ./
RUN bundle install
RUN yarn install
COPY docker/entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment