forked from kwerle/ruby_language_server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (32 loc) · 1.17 KB
/
Dockerfile
File metadata and controls
41 lines (32 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# docker build -t ruby_language_server .
#
# For development:
# docker run -it -v $PWD:/project -v $PWD:/tmp/src -w /tmp/src ruby_language_server sh -c 'bundle && guard'
FROM ruby:2.7-alpine
# COPY qemu-arm-static /usr/bin
LABEL maintainer="kurt@CircleW.org"
LABEL maintainer="agpenton@gmail.com"
RUN gem update bundler
# Needed for byebug and some other gems
RUN apk update
# changes as of ruby 4:
# ncurses for guard
# linux-headers to build some io code - maybe to do with sockets
RUN apk add curl make g++ sqlite-dev yaml-dev linux-headers ncurses
WORKDIR /usr/local/src
RUN curl -O -L https://github.com/mateusza/SQLite-Levenshtein/archive/master.zip
RUN unzip master.zip
WORKDIR /usr/local/src/SQLite-Levenshtein-master
RUN ./configure
RUN make -j 8 install
WORKDIR /app
RUN rm -rf /usr/local/src
# We expect the target project to be mounted here:
ENV RUBY_LANGUAGE_SERVER_PROJECT_ROOT=/project/
# ENV LOG_LEVEL DEBUG
COPY Gemfile* ruby_language_server.gemspec ./
COPY lib/ruby_language_server/version.rb lib/ruby_language_server/version.rb
RUN bundle install -j 8
COPY . ./
# We must not use bundle exec, here - we are running in the
CMD ["ruby", "/app/exe/ruby_language_server"]