1
+ FROM selenium/standalone-chrome:latest
2
+
3
+ # Variables
4
+ ENV MAVEN_VERSION=3.6.0 \
5
+ MAVEN_HOME=/usr/lib/mvn \
6
+ NODE_VERSION=10.14.2 \
7
+ SHELL=/bin/bash \
8
+ LANG=en_US.UTF-8 \
9
+ CSVER=3.0.0
10
+ ENV PATH $MAVEN_HOME/bin:/usr/local/bin:$PATH
11
+
12
+ # Packages
13
+
14
+ USER root
15
+
16
+ RUN apt-get update \
17
+ && apt-get install -y openjdk-11-jdk \
18
+ curl \
19
+ dumb-init \
20
+ && curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - \
21
+ && apt-get install -y \
22
+ nodejs \
23
+ maven \
24
+ net-tools \
25
+ git \
26
+ && apt-get clean \
27
+ && rm -rf /var/lib/apt/lists/* \
28
+ && rm -rf /var/cache/oracle-jdk11-installer \
29
+ && npm install -g npmlog \
30
+ && mkdir /automation \
31
+ && curl -SsL https://downloads.gauge.org/stable | sh \
32
+ && gauge install java \
33
+ && gauge install js \
34
+ && gauge install screenshot \
35
+ && gauge install html-report \
36
+ && gauge install xml-report
37
+
38
+ # https://wiki.debian.org/Locale#Manually
39
+ RUN sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen \
40
+ && locale-gen \
41
+ && chsh -s /bin/bash \
42
+ && echo "seluser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
43
+
44
+ RUN curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.4/fixuid-0.4-linux-amd64.tar.gz | tar -C /usr/local/bin -xzf - && \
45
+ chown root:root /usr/local/bin/fixuid && \
46
+ chmod 4755 /usr/local/bin/fixuid && \
47
+ mkdir -p /etc/fixuid && \
48
+ printf "user: seluser\n group: seluser\n " > /etc/fixuid/config.yml
49
+
50
+ RUN cd /tmp && \
51
+ curl -SsL https://github.com/cdr/code-server/releases/download/$CSVER/code-server-${CSVER}-linux-x86_64.tar.gz | tar -xzf - && \
52
+ mv code-server* /usr/local/lib/code-server && \
53
+ ln -s /usr/local/lib/code-server/code-server /usr/local/bin/code-server
54
+
55
+ USER seluser
56
+ RUN /usr/local/bin/code-server --install-extension getgauge.gauge
57
+
58
+ EXPOSE 8080
59
+ WORKDIR /home/seluser
60
+ ENTRYPOINT ["dumb-init" , "fixuid" , "-q" , "/usr/local/bin/code-server" , "--host" , "0.0.0.0" , "." ]
0 commit comments