Skip to content

Commit

Permalink
Added ability to automatically install self-signed root CA to Chromiu…
Browse files Browse the repository at this point in the history
…m-based browsers (related to aerokube#225)
  • Loading branch information
vania-pooh authored and lorsatti committed Apr 9, 2020
1 parent 2d6a58e commit 0b28883
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 12 deletions.
1 change: 1 addition & 0 deletions selenium/base/base_6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ RUN \
libfreetype6 \
libxfont2 \
libxft2 \
libnss3-tools \
xfonts-base \
xfonts-encodings \
xfonts-utils \
Expand Down
4 changes: 2 additions & 2 deletions selenium/base/java/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM selenoid/base:5.0
FROM selenoid/base:6.0

RUN \
apt-get update && \
apt-get install -y openjdk-8-jre-headless && \
apt-get clean && \
rm -Rf /tmp/*
rm -Rf /tmp/*
2 changes: 1 addition & 1 deletion selenium/chrome/apt/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM selenoid/base:5.0
FROM selenoid/base:6.0

ARG VERSION
ARG CLEANUP
Expand Down
14 changes: 14 additions & 0 deletions selenium/chrome/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ if [ -z "$QUIET" ]; then
DRIVER_ARGS="--verbose"
fi

ROOT_CA_PATH=${ROOT_CA_PATH:-""}
if [ -r "$ROOT_CA_PATH" ]; then
ROOT_CA=$(<"$ROOT_CA_PATH")
ROOT_CA_NAME=$(basename "$ROOT_CA_PATH" | sed -e 's|.crt||g')
fi

ROOT_CA=${ROOT_CA:-""}
if [ -n "$ROOT_CA" ]; then
ROOT_CA_NAME=${ROOT_CA_NAME:-"UserRootCA"}
mkdir -p ~/.pki/nssdb
certutil -d "sql:$HOME/.pki/nssdb" -N --empty-password
echo "$ROOT_CA" | certutil -d "sql:$HOME/.pki/nssdb" -A -t TC -n "$ROOT_CA_NAME"
fi

clean() {
if [ -n "$FILESERVER_PID" ]; then
kill -TERM "$FILESERVER_PID"
Expand Down
2 changes: 1 addition & 1 deletion selenium/chrome/local/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM selenoid/base:5.0
FROM selenoid/base:6.0

ARG VERSION=noop
ARG CLEANUP=noop
Expand Down
2 changes: 1 addition & 1 deletion selenium/firefox/apt/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM selenoid/base:5.0@@REQUIRES_JAVA@@
FROM selenoid/base:6.0@@REQUIRES_JAVA@@

ARG VERSION
ARG CLEANUP
Expand Down
2 changes: 1 addition & 1 deletion selenium/firefox/local/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM selenoid/base:5.0@@REQUIRES_JAVA@@
FROM selenoid/base:6.0@@REQUIRES_JAVA@@

ARG VERSION=noop
ARG CLEANUP
Expand Down
2 changes: 1 addition & 1 deletion selenium/opera/blink/apt/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM selenoid/base:5.0
FROM selenoid/base:6.0

ARG VERSION
ARG CLEANUP
Expand Down
16 changes: 15 additions & 1 deletion selenium/opera/blink/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,27 @@ if [ -z "$QUIET" ]; then
DRIVER_ARGS="--verbose"
fi

ROOT_CA_PATH=${ROOT_CA_PATH:-""}
if [ -r "$ROOT_CA_PATH" ]; then
ROOT_CA=$(<"$ROOT_CA_PATH")
ROOT_CA_NAME=$(basename "$ROOT_CA_PATH" | sed -e 's|.crt||g')
fi

ROOT_CA=${ROOT_CA:-""}
if [ -n "$ROOT_CA" ]; then
ROOT_CA_NAME=${ROOT_CA_NAME:-"UserRootCA"}
mkdir -p ~/.pki/nssdb
certutil -d "sql:$HOME/.pki/nssdb" -N --empty-password
echo "$ROOT_CA" | certutil -d "sql:$HOME/.pki/nssdb" -A -t TC -n "$ROOT_CA_NAME"
fi

clean() {
if [ -n "$FILESERVER_PID" ]; then
kill -TERM "$FILESERVER_PID"
fi
if [ -n "$XSELD_PID" ]; then
kill -TERM "$XSELD_PID"
fi
fi
if [ -n "$XVFB_PID" ]; then
kill -TERM "$XVFB_PID"
fi
Expand Down
2 changes: 1 addition & 1 deletion selenium/opera/blink/local/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM selenoid/base:5.0
FROM selenoid/base:6.0

ARG VERSION=noop
ARG CLEANUP=noop
Expand Down
2 changes: 1 addition & 1 deletion selenium/opera/presto/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM selenoid/base:5.0_java
FROM selenoid/base:6.0_java

ARG VERSION=12.16.1860
ARG CLEANUP
Expand Down
2 changes: 1 addition & 1 deletion selenium/yandex/apt/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM selenoid/base:5.0
FROM selenoid/base:6.0

ARG VERSION=19.4.2.698-1
ARG CLEANUP
Expand Down
14 changes: 14 additions & 0 deletions selenium/yandex/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ if [ -z "$QUIET" ]; then
DRIVER_ARGS="--verbose"
fi

ROOT_CA_PATH=${ROOT_CA_PATH:-""}
if [ -r "$ROOT_CA_PATH" ]; then
ROOT_CA=$(<"$ROOT_CA_PATH")
ROOT_CA_NAME=$(basename "$ROOT_CA_PATH" | sed -e 's|.crt||g')
fi

ROOT_CA=${ROOT_CA:-""}
if [ -n "$ROOT_CA" ]; then
ROOT_CA_NAME=${ROOT_CA_NAME:-"UserRootCA"}
mkdir -p ~/.pki/nssdb
certutil -d "sql:$HOME/.pki/nssdb" -N --empty-password
echo "$ROOT_CA" | certutil -d "sql:$HOME/.pki/nssdb" -A -t TC -n "$ROOT_CA_NAME"
fi

clean() {
if [ -n "$FILESERVER_PID" ]; then
kill -TERM "$FILESERVER_PID"
Expand Down
2 changes: 1 addition & 1 deletion selenium/yandex/local/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM selenoid/base:5.0
FROM selenoid/base:6.0

ARG VERSION=noop
ARG CLEANUP=noop
Expand Down

0 comments on commit 0b28883

Please sign in to comment.