Skip to content

Commit 7d7acf4

Browse files
committed
Fix system certificates issues
1 parent 87b0851 commit 7d7acf4

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

testkit/Dockerfile

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,31 @@
11
FROM ubuntu:20.04
22

3+
ARG NODE_VERSION=10
4+
35
ENV DEBIAN_FRONTEND noninteractive
4-
ENV NODE_OPTIONS --max_old_space_size=4096
6+
ENV NODE_OPTIONS --max_old_space_size=4096 --use-openssl-ca
7+
8+
# Configuring NodeJS version
9+
RUN apt-get clean
10+
11+
RUN apt-get update && \
12+
apt-get upgrade -y && \
13+
apt-get install -y curl
14+
15+
RUN curl -sL https://deb.nodesource.com/setup_${NODE_VERSION:=10}.x | sh
516

617
RUN apt-get update && \
18+
apt-get upgrade -y && \
719
apt-get install -y \
820
git \
921
curl \
1022
python3 \
1123
nodejs \
12-
npm \
1324
firefox \
25+
nodejs \
1426
&& rm -rf /var/lib/apt/lists/*
1527

16-
RUN npm install -g npm@7 \
17-
&& /bin/bash -c "hash -d npm"
28+
RUN /bin/bash -c "hash -d npm"
1829

1930
# Enable tls v1.0
2031
RUN echo "openssl_conf = openssl_configuration\n"|cat - /etc/ssl/openssl.cnf > /tmp/openssl_conf.cnf \
@@ -31,14 +42,20 @@ CipherString = DEFAULT:@SECLEVEL=1" >> /etc/ssl/openssl.cnf
3142
COPY CAs/* /usr/local/share/ca-certificates/
3243
# Store custom CAs somewhere where the backend can find them later.
3344
COPY CustomCAs/* /usr/local/share/custom-ca-certificates/
34-
RUN update-ca-certificates
45+
46+
RUN update-ca-certificates --verbose
3547

3648
# Creating an user for building the driver and running the tests
3749
RUN useradd -m driver && echo "driver:driver" | chpasswd && adduser driver sudo
3850
VOLUME /driver
39-
RUN chown -Rh driver:driver /driver
51+
RUN chown -Rh driver:driver /home/driver
52+
WORKDIR /home/driver
53+
4054
USER driver
4155
WORKDIR /home/driver
4256
CMD /bin/bash
4357
RUN mkdir /home/driver/.npm_global
4458
RUN npm config set prefix /home/driver/.npm_global
59+
60+
RUN node --version
61+
RUN npm --version

0 commit comments

Comments
 (0)