This quickstart provides a reproducible Docker environment that builds secure_chrome_launcher and runs Chromium under SEChrome policies.
From the SEChrome/ directory:
docker build -t sechrome:dev -f docker/Dockerfile .If you are in mainland China, use a closer Debian mirror to speed up the Chromium install step (pick one):
# Aliyun
docker build -t sechrome:dev -f docker/Dockerfile . \
--build-arg APT_MIRROR=mirrors.aliyun.com \
--build-arg APT_SECURITY_MIRROR=mirrors.aliyun.com# TUNA (Tsinghua)
docker build -t sechrome:dev -f docker/Dockerfile . \
--build-arg APT_MIRROR=mirrors.tuna.tsinghua.edu.cn \
--build-arg APT_SECURITY_MIRROR=mirrors.tuna.tsinghua.edu.cn# USTC
docker build -t sechrome:dev -f docker/Dockerfile . \
--build-arg APT_MIRROR=mirrors.ustc.edu.cn \
--build-arg APT_SECURITY_MIRROR=mirrors.ustc.edu.cnAlso consider configuring a Docker registry mirror to speed up pulling base images (one-time on the host):
Create /etc/docker/daemon.json:
{
"registry-mirrors": [
"https://mirror.ccs.tencentyun.com",
"https://docker.mirrors.ustc.edu.cn"
]
}Then restart Docker:
sudo systemctl restart dockerAfter building, you can verify the image works correctly:
./docker/test_docker.shThis will run automated tests to ensure:
- The image can successfully fetch and dump web pages
- The launcher binary exists and is executable
- The configuration file is present
Ptrace inside Docker typically requires:
SYS_PTRACE- an unconfined Docker seccomp profile (otherwise
ptraceis often blocked)
docker run --rm -it \
--cap-add=SYS_PTRACE \
--security-opt seccomp=unconfined \
--shm-size=1g \
sechrome:dev \
--config=/app/docker/config.docker.yaml -- --dump-dom https://example.comSecurity note for container configs:
- The included
docker/config.docker.yamlis designed to avoid whitelisting/home. - The image runs as a non-root user with
HOMEandXDG_CONFIG_HOMEredirected under/tmp, so Chrome writes stay under/tmp(which is already the intended write scope).
Seccomp user-notify typically requires:
SYS_ADMIN- an unconfined Docker seccomp profile (or a custom profile that allows
seccomp())
docker run --rm -it \
--cap-add=SYS_ADMIN \
--security-opt seccomp=unconfined \
--shm-size=1g \
sechrome:dev \
--config=/app/docker/config.docker.yaml -- --dump-dom https://example.comThen edit /app/docker/config.docker.yaml in the image or mount your own config and set:
security.seccomp_notify: truesecurity.ptrace_enabled: false
Mount a config from the host:
docker run --rm -it \
--cap-add=SYS_PTRACE \
--security-opt seccomp=unconfined \
--shm-size=1g \
-v "$PWD/docker/config.docker.yaml:/app/config.yaml:ro" \
sechrome:dev \
--config=/app/config.yaml -- --dump-dom https://example.com- If Chromium fails to start, inspect
/tmp/sechrome_audit.log(inside the container) and widen rules minimally. - If you see
Operation not permittedfor ptrace: ensure--cap-add=SYS_PTRACEand--security-opt seccomp=unconfined. - If seccomp-notify cannot initialize: ensure
--cap-add=SYS_ADMINand--security-opt seccomp=unconfined.