Skip to content

Commit 148dca6

Browse files
committed
Fix system certificates issues
1 parent 4ca59ca commit 148dca6

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

testkit/Dockerfile

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
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
510

611
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
16+
17+
RUN apt-get update && \
18+
apt-get upgrade -y && \
719
apt-get install -y \
820
git \
921
curl \
1022
python3 \
23+
nodejs \
1124
firefox \
25+
nodejs \
1226
&& rm -rf /var/lib/apt/lists/*
1327

14-
# Configuring NodeJS version
15-
RUN apt-get clean
16-
RUN curl -sL https://deb.nodesource.com/setup_${NODE_VERSION:=10}.x | sh
17-
RUN apt-get install -y nodejs && rm -rf /var/lib/apt/lists/*
1828
RUN /bin/bash -c "hash -d npm"
1929

2030
# Enable tls v1.0
@@ -32,16 +42,20 @@ CipherString = DEFAULT:@SECLEVEL=1" >> /etc/ssl/openssl.cnf
3242
COPY CAs/* /usr/local/share/ca-certificates/
3343
# Store custom CAs somewhere where the backend can find them later.
3444
COPY CustomCAs/* /usr/local/share/custom-ca-certificates/
45+
3546
RUN update-ca-certificates --verbose
3647

3748
# Creating an user for building the driver and running the tests
3849
RUN useradd -m driver && echo "driver:driver" | chpasswd && adduser driver sudo
3950
VOLUME /driver
40-
RUN chown -Rh driver:driver /driver
4151
RUN chown -Rh driver:driver /home/driver
4252
WORKDIR /home/driver
4353

4454
USER driver
55+
WORKDIR /home/driver
56+
CMD /bin/bash
57+
RUN mkdir /home/driver/.npm_global
58+
RUN npm config set prefix /home/driver/.npm_global
4559

4660
RUN node --version
4761
RUN npm --version

0 commit comments

Comments
 (0)