-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
73 lines (59 loc) · 1.82 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
ARG RUBY_VERSION="2.7.0"
FROM ruby:$RUBY_VERSION
ARG USER="diagrams"
ARG UID="1000"
RUN apt-get -qq update && \
apt-get install -yq --no-install-recommends \
build-essential \
git \
sudo \
vim \
default-jre-headless \
graphviz \
npm \
libatk1.0-0 \
libatk-bridge2.0-0 \
libgtk-3-0 \
libx11-xcb1 \
libxcomposite1 \
libxrandr2 \
libxss1 \
libpango1.0-dev \
libpython3-dev \
python3-pip \
python3-setuptools \
python3-cairo \
python3-gi \
python3-gi-cairo && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN useradd -s /bin/bash -m --no-user-group --uid $UID $USER
USER $USER
ENV HOME=/home/$USER
ENV GEM_HOME=$HOME/.gem/ruby/$RUBY_VERSION \
LOCAL_PATH=$HOME/.local \
NPM_PREFIX=$HOME/.npm
ENV PATH=$GEM_HOME/bin:$LOCAL_PATH/bin:$NPM_PREFIX/bin:$PATH
RUN gem install --no-document --user-install bundler && \
npm config set prefix $HOME/.npm && \
npm install --global --silent \
mermaid.cli \
nomnoml \
state-machine-cat \
vega-cli \
vega-lite \
wavedrom-cli && \
pip3 install --quiet --user \
actdiag \
blockdiag \
nwdiag \
seqdiag \
syntrax
WORKDIR $HOME/work
COPY Gemfile Gemfile.lock jekyll-diagrams.gemspec ./
COPY lib/jekyll-diagrams/version.rb ./lib/jekyll-diagrams/version.rb
USER root
RUN chown -R $USER:users $HOME/work
USER $USER
RUN bundle install
ENTRYPOINT ["/bin/bash"]