forked from ComPlat/chemotion_ELN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.focal.gitlab-ci
81 lines (65 loc) · 3.37 KB
/
Dockerfile.focal.gitlab-ci
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
74
75
76
77
78
79
80
FROM ubuntu:focal
ARG DEBIAN_FRONTEND=noninteractive
ARG VRUBY=2.7.7
ARG VNODE=14.21.3
ARG VNODENEXT=16.16.0
RUN set -xe && apt-get update -yqqq --fix-missing && apt-get upgrade -y
RUN apt update && apt-get install -yqq --fix-missing bash ca-certificates wget apt-transport-https git gpg\
imagemagick libmagic-dev libmagickcore-dev libmagickwand-dev curl gnupg2 \
build-essential nodejs sudo postgresql-client libappindicator1 swig \
gconf-service libasound2 libgconf-2-4 cmake \
libnspr4 libnss3 libpango1.0-0 libxss1 xdg-utils tzdata libpq-dev \
gtk2-engines-pixbuf \
libssl-dev libreadline-dev\
unzip openssh-client \
python-dev libsqlite3-dev libboost-all-dev p7zip-full \
xfonts-cyrillic xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable \
fonts-crosextra-caladea fonts-crosextra-carlito \
fonts-dejavu fonts-dejavu-core fonts-dejavu-extra fonts-liberation2 fonts-liberation \
fonts-linuxlibertine fonts-noto-core fonts-noto-extra fonts-noto-ui-core \
fonts-opensymbol fonts-sil-gentium fonts-sil-gentium-basic
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list \
&& apt-get update -yqqq && apt-get -y install google-chrome-stable \
&& CHROMEDRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` \
&& mkdir -p /opt/chromedriver-$CHROMEDRIVER_VERSION \
&& curl -sS -o /tmp/chromedriver_linux64.zip http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip \
&& unzip -qq /tmp/chromedriver_linux64.zip -d /opt/chromedriver-$CHROMEDRIVER_VERSION \
&& rm /tmp/chromedriver_linux64.zip \
&& chmod +x /opt/chromedriver-$CHROMEDRIVER_VERSION/chromedriver \
&& ln -fs /opt/chromedriver-$CHROMEDRIVER_VERSION/chromedriver /usr/local/bin/chromedriver
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -ms /bin/bash gitlab-runner \
&& echo "gitlab-runner ALL=NOPASSWD: ALL" >> /etc/sudoers
USER gitlab-runner
WORKDIR /home/gitlab-runner
SHELL ["/bin/bash", "-c"]
RUN git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.1
ENV ASDF_DIR=/home/gitlab-runner/.asdf
ENV PATH=/home/gitlab-runner/.asdf/shims:/home/gitlab-runner/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
RUN asdf install nodejs $VNODE
RUN asdf install nodejs $VNODENEXT
RUN asdf global nodejs $VNODE
RUN asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
RUN asdf install ruby $VRUBY
RUN asdf global ruby $VRUBY
RUN mkdir -p shared/node_modules
RUN ln -s shared/node_modules node_modules
COPY Gemfile /home/gitlab-runner/
COPY Gemfile.lock /home/gitlab-runner/
COPY package.json /home/gitlab-runner/
COPY yarn.lock /home/gitlab-runner/
COPY package_postinstall.sh /home/gitlab-runner/
RUN sudo chmod 666 Gemfile.lock
RUN sudo chmod 666 yarn.lock
RUN /bin/bash -l -c "npm install -g yarn"
RUN /bin/bash -l -c "yarn install"
RUN /bin/bash -l -c "gem install bundler -v 2.1.4 && bundle install "
#RUN /bin/bash -l -c "chromedriver-update"
RUN sudo apt -yy remove lib*-dev
RUN sudo apt-get -y --autoremove --fix-missing install \
libboost-serialization1.71.0 \
libboost-iostreams1.71.0 \
libboost-system1.71.0