4 Star 17 Fork 8

Gitee 极速下载 / motor-admin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/motor-admin/motor-admin
克隆/下载
Dockerfile 1.59 KB
一键复制 编辑 原始数据 按行查看 历史
Pete Matsyburka 提交于 2023-06-11 13:08 . fix docker build
FROM ruby:3.2.0-alpine as webpacker
ENV RAILS_ENV=production
ENV NODE_ENV=production
WORKDIR /opt
RUN apk add --no-cache nodejs yarn git build-base python3 && \
gem install shakapacker
COPY ./package.json ./yarn.lock ./
RUN yarn install --network-timeout 1000000
COPY ./bin/webpacker ./bin/webpacker
COPY ./config/webpack ./config/webpack
COPY ./config/webpacker.yml ./config/webpacker.yml
COPY ./postcss.config.js ./babel.config.js ./
COPY ./app/packs ./app/packs
RUN echo "gem 'shakapacker'" > Gemfile && ./bin/webpacker
FROM ruby:3.2.0-alpine as assets
WORKDIR /opt
RUN apk add --no-cache nodejs yarn git build-base python3
COPY ./vendor/motor-admin/ui/package.json ./vendor/motor-admin/ui/yarn.lock ./
RUN yarn install --network-timeout 1000000
COPY ./vendor/motor-admin/ui ./
RUN yarn build:prod
FROM ruby:3.2.0-alpine as app
ENV RAILS_ENV=production
ENV BUNDLE_WITHOUT="development:test"
WORKDIR /opt/motor-admin
RUN apk add --no-cache freetds-dev sqlite-dev libpq-dev mariadb-dev build-base
COPY ./Gemfile ./Gemfile.lock ./
COPY ./vendor/motor-admin/lib/motor/version.rb ./vendor/motor-admin/lib/motor/version.rb
COPY ./vendor/motor-admin/motor-admin.gemspec ./vendor/motor-admin/motor-admin.gemspec
RUN bundle update --bundler && bundle install && rm -rf ~/.bundle
COPY . ./
COPY --from=assets /opt/dist ./vendor/motor-admin/ui/dist
COPY --from=webpacker /opt/public/packs ./public/packs
RUN bundle exec bootsnap precompile --gemfile app/ lib/
RUN ln -s /opt/motor-admin/bin/motor-admin /usr/local/bin && chmod +x /usr/local/bin/motor-admin
WORKDIR /app
ENV WORKDIR=/app/
CMD motor-admin
Ruby
1
https://gitee.com/mirrors/motor-admin.git
git@gitee.com:mirrors/motor-admin.git
mirrors
motor-admin
motor-admin
master

搜索帮助