forked from reiniergs/circleci-centos7-jdk-node-browsers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
57 lines (45 loc) · 1.9 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
FROM centos:7
LABEL maintaner.name="Reinier Guerra"
LABEL maintaner.email="[email protected]"
# Install needed software and users
USER root
RUN groupadd -r circleci && useradd -r -d /home/circleci -m -g circleci circleci
RUN yum -y update
RUN yum install -y git tar curl wget sudo make yum-utils device-mapper-persistent-data lvm2 java-1.8.0-openjdk-headless java-1.8.0-openjdk-devel maven && \
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo && \
yum install -y docker-ce && \
yum clean all
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Install chrome and chromedriver
RUN yum install -y xorg-x11-server-Xvfb unzip zip
WORKDIR /usr/tmp
ADD google-chrome-stable-65.0.3325.181-1.x86_64.rpm /tmp
RUN yum install -y /tmp/google-chrome-stable-65.0.3325.181-1.x86_64.rpm \
&& rm /tmp/google-chrome-stable-65.0.3325.181-1.x86_64.rpm
# Chromedriver
RUN mkdir -p /root/tmp/chromedriver/2.37
ADD chromedriver-2.37-linux64.zip /root/tmp/chromedriver/2.37/
RUN unzip /root/tmp/chromedriver/2.37/chromedriver-2.37-linux64.zip -d /bin
RUN chmod -R 0755 /bin/chromedriver
ENV PATH /bin/chromedriver:$PATH
# Hub (GitHub CLI Wrapper)
RUN mkdir -p /root/tmp/hub
ADD hub-linux-amd64-2.12.7.tgz /root/tmp/hub/
RUN cp /root/tmp/hub/hub-linux-amd64-2.12.7/bin/hub /bin
RUN chmod -R 0755 /bin/hub
ENV PATH /bin/hub:$PATH
RUN echo "%circleci ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
# Install CFSSL
RUN curl -o /usr/bin/cfssljson https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64
RUN curl -o /usr/bin/cfssl https://pkg.cfssl.org/R1.2/cfssl_linux-amd64
# Install Node
RUN curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -
RUN yum install -y nodejs
RUN node -v
RUN npm -v
# Install Yarn
RUN curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
RUN yum install -y yarn
RUN yum -y install gcc
RUN yum -y install gcc-c++
USER circleci