update good_job
This commit is contained in:
32
Dockerfile
32
Dockerfile
@@ -1,4 +1,4 @@
|
||||
FROM ruby:3.2.0 AS native-gems
|
||||
FROM ruby:3.2.6 AS native-gems
|
||||
RUN rm -f /etc/apt/apt.conf.d/docker-clean; \
|
||||
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
|
||||
RUN \
|
||||
@@ -19,10 +19,10 @@ RUN bundle install
|
||||
RUN rake compile
|
||||
|
||||
# Primary image
|
||||
FROM ruby:3.2.0
|
||||
FROM ruby:3.2.6
|
||||
USER root
|
||||
|
||||
# set up nodejs 18.x deb repo
|
||||
USER root
|
||||
RUN mkdir -p /etc/apt/keyrings && \
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
|
||||
| gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
|
||||
@@ -39,34 +39,26 @@ RUN \
|
||||
apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
libblas-dev liblapack-dev libvips42 ca-certificates curl gnupg nodejs libpq-dev
|
||||
|
||||
USER vscode
|
||||
ENV PATH=/home/vscode/.rbenv/shims:$PATH
|
||||
WORKDIR /usr/src/app
|
||||
RUN gem install bundler -v '2.4.1'
|
||||
RUN bundle config --global frozen 1
|
||||
RUN gem install bundler -v '2.4.6'
|
||||
RUN gem install faiss -v '0.2.5'
|
||||
# RUN bundle config --global frozen 1
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
# install gems
|
||||
COPY --from=native-gems /usr/src/app/gems/xdiff-rb /gems/xdiff-rb
|
||||
COPY --from=native-gems /usr/src/app/gems/rb-bsdiff /gems/rb-bsdiff
|
||||
COPY Gemfile Gemfile.lock ./
|
||||
COPY gems gems
|
||||
RUN bundle install
|
||||
|
||||
# install js dependencies
|
||||
COPY package.json yarn.lock ./
|
||||
RUN npm install yarn && \
|
||||
bin/rails yarn:install && \
|
||||
yarn
|
||||
RUN npm install -g yarn
|
||||
RUN rails yarn:install
|
||||
RUN yarn
|
||||
|
||||
COPY . .
|
||||
COPY --from=native-gems /usr/src/app/gems/xdiff-rb/lib/xdiff gems/xdiff-rb/lib/xdiff
|
||||
COPY --from=native-gems /usr/src/app/gems/rb-bsdiff/lib gems/rb-bsdiff/lib
|
||||
|
||||
# precompile assets
|
||||
ENV RAILS_ENV production
|
||||
RUN bin/rails assets:precompile
|
||||
|
||||
ENV RAILS_ENV worker
|
||||
ENV proxy direct
|
||||
RUN RAILS_ENV=production bin/rails assets:precompile
|
||||
|
||||
RUN mkdir -p tmp/pids
|
||||
CMD /bin/bash
|
||||
|
||||
Reference in New Issue
Block a user