Skip to content

Commit

Permalink
Add gcompat to the Dockerfile to make thruster work
Browse files Browse the repository at this point in the history
Related issue: basecamp/thruster#54
  • Loading branch information
aidewoode committed Nov 27, 2024
1 parent ad36299 commit 6c19684
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,20 @@ FROM base AS builder
ENV RAILS_ENV production
ENV NODE_ENV production

# Build for musl-libc, not glibc (see https://github.com/sparklemotion/nokogiri/issues/2075, https://github.com/rubygems/rubygems/issues/3174)
ENV BUNDLE_FORCE_RUBY_PLATFORM 1

COPY --from=node /usr/local/bin/node /usr/local/bin/node
COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules

RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm

RUN apk add --no-cache tzdata libpq-dev build-base
RUN apk add --no-cache tzdata libpq-dev build-base gcompat

WORKDIR /app

COPY Gemfile* /app/

RUN bundle config --local without 'development test' \
&& bundle install -j4 --retry 3 \
&& bundle exec bootsnap precompile --gemfile app/ lib/ \
&& bundle clean --force \
&& rm -rf /usr/local/bundle/cache \
&& find /usr/local/bundle/gems/ -name "*.c" -delete \
Expand All @@ -45,11 +43,12 @@ RUN apk add --no-cache \
libpq \
vips \
ffmpeg \
curl
curl \
gcompat

WORKDIR /app

EXPOSE 3000
EXPOSE 80

RUN addgroup -g 1000 -S app && adduser -u 1000 -S app -G app

Expand Down

0 comments on commit 6c19684

Please sign in to comment.