forked from mjason/luo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
46 lines (34 loc) · 1.21 KB
/
Dockerfile
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
42
43
44
45
46
FROM ruby:3.2.2
# Install docker/buildx-bin
#COPY --from=docker/buildx-bin /buildx /usr/libexec/docker/cli-plugins/docker-buildx
# Set the working directory to /luo
WORKDIR /luo
# Copy the Gemfile, Gemfile.lock into the container
COPY Gemfile Gemfile.lock luo.gemspec ./
# Required in luo.gemspec
COPY lib/luo/version.rb /luo/lib/luo/version.rb
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential gcc \
&& gem install bundler --version=2.4.6 \
&& bundle install
## install python and jupyterlab
# Install Python and JupyterLab
RUN apt-get install -y --no-install-recommends \
python3 python3-pip python3-dev && \
pip3 install --no-cache-dir jupyterlab && \
pip3 install jupyterlab-language-pack-zh-CN
RUN gem install pry
RUN gem install iruby
RUN iruby register --force
# Expose the JupyterLab port
EXPOSE 8888
# Copy the rest of our application code into the container.
# We do this after bundle install, to avoid having to run bundle
# everytime we do small fixes in the source code.
COPY . .
# Install the gem locally from the project folder
RUN gem build luo.gemspec && \
gem install ./luo-*.gem --no-document
WORKDIR /workdir
RUN rm -rf /luo
ENTRYPOINT ["luo"]