Full-featured Tauri Docker Image based on Rust non-slim Debian images including:
- Tauri
- Node.js with Yarn
- Tarpaulin
- tauri-driver * with WebDriver/WebDriverIO
- psmisc (which includes fuser)
Warning
(*) tauri-driver is currently in pre-alpha
Check the official documentation for more information.
This image is a good base for CIs (builds, unit & e2e tests, etc) as well as for local runs.
Images are automatically updated on a daily basis.
- Supported tags and respective
Dockerfile
links - E2E Testing
- Continuous Integration
- Roadmap
- Contribute
Note
These tags work with both Tauri v1 and v2. But I'm still testing them with Tauri v2 at the moment.
debian-bookworm-22
- Base:
rust:1-bookworm
- Debian v12 ("bookworm") + Rust v1 + Node v22
- Base:
debian-bookworm-22-nightly
- Base:
rust:1-bookworm
- Debian v12 ("bookworm") + Rust v1 (nightly) + Node v22
- Base:
debian-bookworm-20
- Base:
rust:1-bookworm
- Debian v12 ("bookworm") + Rust v1 + Node v20
- Base:
debian-bookworm-20-nightly
- Base:
rust:1-bookworm
- Debian v12 ("bookworm") + Rust v1 (nightly) + Node v20
- Base:
Important
These tags only work with Tauri v1. See tauri-apps/tauri#9039.
debian-bullseye-22
- Base:
rust:1-bullseye
- Debian v11 ("bullseye") + Rust v1 + Node v22
- Base:
debian-bullseye-22-nightly
- Base:
rust:1-bullseye
- Debian v11 ("bullseye") + Rust v1 (nightly) + Node v22
- Base:
debian-bullseye-20
- Base:
rust:1-bullseye
- Debian v11 ("bullseye") + Rust v1 + Node v20
- Base:
debian-bullseye-20-nightly
- Base:
rust:1-bullseye
- Debian v11 ("bullseye") + Rust v1 (nightly) + Node v20
- Base:
Note
These tags only work with Tauri v2. But I'm still testing them at the moment.
fedora-40
- Base:
fedora:40
- Debian v12 ("bookworm") + Rust v1 + Node v22
- Base:
fedora-40-nightly
- Base:
fedora:40
- Debian v12 ("bookworm") + Rust v1 (nightly) + Node v22
- Base:
fedora-40
- Base:
fedora:40
- Debian v12 ("bookworm") + Rust v1 + Node v20
- Base:
fedora-40-nightly
- Base:
fedora:40
- Debian v12 ("bookworm") + Rust v1 (nightly) + Node v20
- Base:
These tags exist but their image is not updated anymore.
debian-bookworm-18
debian-bookworm-18-nightly
debian-bullseye-18
debian-bullseye-18-nightly
fedora-37-20
fedora-37-20-nightly
fedora-37-18
fedora-37-18-nightly
Since tauri-driver
is available as a global command in this image, you can use it as is in wdio.config.js
(see documentation):
// ...
const config = {
// ...
beforeSession: () => {
// => No need for that: `path.resolve(os.homedir(), '.cargo', 'bin', 'tauri-driver')`
tauriDriver = spawn("tauri-driver", [], {
stdio: [null, process.stdout, process.stderr],
});
},
// ...
};
// ...
Example:
jobs:
core_unit_test:
name: Core Unit Test
runs-on: ubuntu-latest
container:
image: ivangabriele/tauri:debian-bullseye-18
# This is REQUIRED if you use `tarpaulin`
# https://github.com/xd009642/tarpaulin/issues/146
# https://github.com/xd009642/tarpaulin#github-actions
options: --security-opt seccomp=unconfined
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run
run: cargo test
working-directory: ./src-tauri
# https://github.com/xd009642/tarpaulin#github-actions
- name: Generate Coverage
run: cargo tarpaulin --all-features --out Xml --timeout 120 --verbose
working-directory: ./src-tauri
# Add any other step here to upload your coverage somewhere
e2e_test:
name: E2E Test
runs-on: ubuntu-latest
container:
image: ivangabriele/tauri:debian-bullseye-18
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js dependencies
run: yarn --frozen-lockfile # or `npm ci`
- name: Build
# Add your core + webview build command(s)
run: ...
# I recommend using `nick-fields/retry@v2` action here
# with a `fuser -n tcp -k 4445` command to kill the process using (likely Selenium)
# since WebdriverIO often hangs out during the first run (unable to connect)
- name: Run tests
uses: nick-fields/retry@v2
with:
timeout_seconds: 600
max_attempts: 3
retry_on: error
# https://tauri.app/v1/guides/testing/webdriver/ci
command: |
fuser -n tcp -k 4445
xvfb-run wdio run ./configs/wdio.config.js
Excepted Ubuntu, all those planned distributions are a maybe for now.
- Arch
- Fedora 38
- NixOS
- openSUSE
- Ubuntu 22
X
is the OS name + version (one of debian-bookworm
, debian-bullseye
, fedora-37
).
y
is the Node.js tag (one of 18
, 20
).
Z
is the Rust variant (-nightly
or nothing).
DOCKER_CONTAINER_NAME=[DOCKER_TAG] make build
Example: DOCKER_CONTAINER_NAME=debian-bullseye-18 make build
DOCKER_CONTAINER_NAME=[DOCKER_TAG] make run
Example: DOCKER_CONTAINER_NAME=debian-bullseye-18 make run
You need to have Node.js installed in order to run the tests:
DOCKER_CONTAINER_NAME=[DOCKER_TAG] make test
Example: DOCKER_CONTAINER_NAME=debian-bullseye-18 make test
.