1. **Bật WSL integration** trong Docker Desktop. 2. Thêm các dòng cài libs GUI sau vào Dockerfile: ```dockerfile RUN apt-get update && apt-get install -y \ dbus-x11 \ libxshmfence1 \ libnss3 \ libatk-bridge2.0-0 \ libgtk-3-0 \ libgbm1 \ libasound2 \ xdg-utils \ fonts-liberation \ libx11-xcb1 ``` 3. Trong `docker-compose.yml` service chạy Chrome, thêm: ```yaml environment: - DISPLAY=:0 volumes: - /mnt/wslg/.X11-unix:/tmp/.X11-unix ``` 4. `docker compose up -d --build` 5. Test mở Chrome: ```bash docker exec <container_name> bash -lc \ 'node -e " const p = require(\"puppeteer-core\"); (async () => { const browser = await p.launch({ headless: false, executablePath: \"/usr/bin/google-chrome\", args: [\"--no-sandbox\", \"--disable-dev-shm-usage\", \"--disable-gpu\", \"--incognito\", \"--js-flags=--noexpose_wasm,--jitless\"] }); await browser.newPage(); await new Promise(() => {}); })(); "' ```  Hoặc là chỉnh thẳng vào code của con bot với `headless: false` -> Quan sát hành động của bot dễ hơn -> Dễ làm bài CTF hơn
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up