-
Notifications
You must be signed in to change notification settings - Fork 149
/
Copy pathDockerfile
75 lines (60 loc) · 1.98 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
74
75
FROM ubuntu:20.04
ARG NODE_VERSION=10
ARG DENO_VERSION=1.37.2
ENV DEBIAN_FRONTEND noninteractive
ENV NODE_OPTIONS --max_old_space_size=4096 --use-openssl-ca
# Configuring NodeJS version
RUN apt-get clean
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_${NODE_VERSION:=10}.x | bash -
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
git \
curl \
python3 \
nodejs \
firefox \
nodejs \
unzip \
&& rm -rf /var/lib/apt/lists/*
RUN /bin/bash -c "hash -d npm"
# Enable tls v1.0
RUN echo "openssl_conf = openssl_configuration\n"|cat - /etc/ssl/openssl.cnf > /tmp/openssl_conf.cnf \
&& mv /tmp/openssl_conf.cnf /etc/ssl/openssl.cnf
RUN echo "[openssl_configuration]\n\
ssl_conf = ssl_configuration\n\
[ssl_configuration]\n\
system_default = tls_system_default\n\
[tls_system_default]\n\
CipherString = DEFAULT:@SECLEVEL=1" >> /etc/ssl/openssl.cnf
# Install our own CAs on the image.
# Assumes Linux Debian based image.
COPY CAs/* /usr/local/share/ca-certificates/
# Store custom CAs somewhere where the backend can find them later.
COPY CustomCAs/* /usr/local/share/custom-ca-certificates/
RUN update-ca-certificates --verbose
# Add Deno
RUN curl -fsSL https://deno.land/x/install/install.sh | sh -s v$DENO_VERSION
RUN mv /root/.deno/bin/deno /usr/bin/
# Using System CA in Deno
ENV DENO_TLS_CA_STORE=system
# Creating an user for building the driver and running the tests
RUN useradd -m driver && echo "driver:driver" | chpasswd && adduser driver sudo
VOLUME /driver
RUN chown -Rh driver:driver /home/driver
WORKDIR /home/driver
USER driver
WORKDIR /home/driver
CMD /bin/bash
RUN mkdir /home/driver/.npm_global
ENV PATH="${PATH}:/home/driver/.npm_global/bin"
RUN npm config set prefix /home/driver/.npm_global
RUN npm install -g yarn
## Versions
RUN node --version
RUN npm --version
RUN /home/driver/.npm_global/bin/yarn --version
RUN deno --version