Dockerfile31 lines · 581 chars FROM ruby:3.2-slim
ENV LANG=C.UTF-8
RUN apt-get update -qq && apt-get install -y --no-install-recommends \
build-essential \
patch \
git \
curl \
ca-certificates \
zlib1g-dev \
liblzma-dev \
libreadline-dev \
make \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy the repository
COPY . .
# Initialize a git repository to satisfy gemspec's file listing
RUN git init \
&& git add -A \
&& git status
# Build and install the gem from source
RUN gem build solargraph.gemspec && \
gem install --no-document solargraph-*.gem
CMD ["solargraph", "stdio"]