-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 922 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 922 Bytes
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
ARG SELENIUM_VERSION=144.0-20260120
FROM selenium/standalone-chromium:${SELENIUM_VERSION}
# Retrieve certificate content from GitHub secret
ARG customca
ARG customca_dest=/usr/local/share/ca-certificates/certificate.crt
USER root
# Copy certificate to desired certificate destination file
ADD $customca $customca_dest
# Update CA certificates
RUN apt-get update \
&& apt-get install -y --no-install-recommends openssl ca-certificates \
&& update-ca-certificates \
&& chmod a+r $customca_dest \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
USER seluser
# Create NSS database directory
RUN mkdir -p $HOME/.pki/nssdb
# Add the custom CA certificate to NSS database
RUN certutil -d sql:$HOME/.pki/nssdb -A -t "C,," -n customca -i $customca_dest
# Label for multi-arch support
LABEL org.opencontainers.image.description="Selenium standalone Chromium with custom CA (multi-arch: amd64, arm64)"