forked from nbgallery/nbgallery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (39 loc) · 1.17 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.1
MAINTAINER [email protected]
# Install OS packages
RUN \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
default-mysql-client \
vim \
libfuzzy-dev && \
rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/nbgallery
# Copy everything needed to bundle install
COPY Gemfile Gemfile.lock ./
COPY extensions extensions/
RUN \
bundle config set deployment 'true' && \
bundle install --without=development test && \
rm /usr/src/nbgallery/vendor/bundle/ruby/*/cache/* && \
rm -rf /usr/src/nbgallery/vendor/bundle/ruby/*/gems/*/test
# Copy over the rest
COPY Rakefile config.ru docker-entrypoint.sh ./
COPY bin bin/
COPY config config/
COPY db db/
COPY lib lib/
COPY public public/
COPY script script/
COPY vendor/assets vendor/assets/
COPY app app/
# # Final setup for running the app
EXPOSE 3000
ENV RAILS_ENV=production
# Required for mathjax to make it out of the container now
ENV RAILS_SERVE_STATIC_FILES=true
CMD ["/usr/src/nbgallery/docker-entrypoint.sh"]
LABEL gallery.nb.version=2.0.0 \
gallery.nb.description="nbgallery rails app for notebook sharing" \
gallery.nb.URL="https://github.com/nbgallery"