1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

WSL2でCypressをコンテナで起動

Posted at

概要

CypressをWindows11で構築した時のメモ

環境

  • Windows11
  • WSL2(Ubuntu)

手順

  • WSL2インストール
    • WSLg確認
  • Docker Desktop
  • 起動

WSL2インストール

WSLのインストール詳細は割愛

WSLg確認

参考:https://blog.mohyo.net/2022/02/11591/

Docker Desktop

「Docker Desktop for Windows」をインストールしてWSLで実行するように設定
参考:https://docs.docker.com/desktop/windows/wsl/#develop-with-docker-and-wsl-2

起動

docker-compose.yml
version: '3'

services:
  cypress:
    image: cypress/included:10.3.1
    environment:
      - DISPLAY=:0
    working_dir: /e2e
    volumes:
      - ./:/e2e
      - /tmp/.X11-unix:/tmp/.X11-unix
      - /mnt/wslg:/mnt/wslg
    
    entrypoint: cypress open --project /e2e

参考

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?