-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github-ci: Package the app as a container image
Signed-off-by: Matheus Castello <[email protected]>
- Loading branch information
1 parent
db67acd
commit 562c72f
Showing
6 changed files
with
119 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,87 +1,43 @@ | ||
version: "3.9" | ||
services: | ||
torizon-emulator-manager-debug: | ||
torizon-emulator-manager: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.debug | ||
image: ${LOCAL_REGISTRY}:5002/torizon-emulator-manager-debug:${TAG} | ||
ports: | ||
- 2222:2222 | ||
dockerfile: Dockerfile | ||
image: commontorizon/torizon-emulator-manager:amd64-v1 | ||
devices: | ||
- /dev/kvm | ||
environment: | ||
- XDG_DATA_DIRS=${XDG_DATA_DIRS} | ||
- XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR} | ||
- WAYLAND_DISPLAY= | ||
- DISPLAY=${DISPLAY} | ||
volumes: | ||
- type: bind | ||
source: /tmp | ||
target: /tmp | ||
- type: bind | ||
source: /dev | ||
target: /dev | ||
device_cgroup_rules: | ||
# ... for tty0 | ||
- "c 4:0 rmw" | ||
# ... for tty7 | ||
- "c 4:7 rmw" | ||
# ... for /dev/input devices | ||
- "c 13:* rmw" | ||
- "c 199:* rmw" | ||
# ... for /dev/dri devices | ||
- "c 226:* rmw" | ||
depends_on: [ | ||
weston | ||
] | ||
- /tmp/.X11-unix:/tmp/.X11-unix | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- /run:/run | ||
- /var:/var | ||
pid: host | ||
network_mode: host | ||
privileged: true | ||
|
||
torizon-emulator-manager: | ||
torizon-emulator-manager-wsl: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
image: ${DOCKER_LOGIN}/torizon-emulator-manager:${TAG} | ||
volumes: | ||
- type: bind | ||
source: /tmp | ||
target: /tmp | ||
- type: bind | ||
source: /dev | ||
target: /dev | ||
device_cgroup_rules: | ||
# ... for tty0 | ||
- "c 4:0 rmw" | ||
# ... for tty7 | ||
- "c 4:7 rmw" | ||
# ... for /dev/input devices | ||
- "c 13:* rmw" | ||
- "c 199:* rmw" | ||
# ... for /dev/dri devices | ||
- "c 226:* rmw" | ||
depends_on: [ | ||
weston | ||
] | ||
|
||
weston: | ||
image: commontorizon/weston${GPU}:4-rc | ||
image: commontorizon/torizon-emulator-manager:amd64-v1 | ||
devices: | ||
- /dev/kvm | ||
environment: | ||
- ACCEPT_FSL_EULA=1 | ||
# Required to get udev events from host udevd via netlink | ||
network_mode: host | ||
- XDG_DATA_DIRS=${XDG_DATA_DIRS} | ||
- XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR} | ||
- WAYLAND_DISPLAY= | ||
- DISPLAY=${DISPLAY} | ||
volumes: | ||
- type: bind | ||
source: /tmp | ||
target: /tmp | ||
- type: bind | ||
source: /dev | ||
target: /dev | ||
- type: bind | ||
source: /run/udev | ||
target: /run/udev | ||
cap_add: | ||
- CAP_SYS_TTY_CONFIG | ||
# Add device access rights through cgroup... | ||
device_cgroup_rules: | ||
# ... for tty0 | ||
- "c 4:0 rmw" | ||
# ... for tty1 | ||
- "c 4:1 rmw" | ||
# ... for tty7 | ||
- "c 4:7 rmw" | ||
# ... for /dev/input devices | ||
- "c 13:* rmw" | ||
- "c 199:* rmw" | ||
# ... for /dev/dri devices | ||
- "c 226:* rmw" | ||
- /tmp/.X11-unix:/tmp/.X11-unix | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- /mnt/wsl/docker.sock:/var/run/docker.sock | ||
- /run:/run | ||
- /var:/var | ||
pid: host | ||
network_mode: host | ||
privileged: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
if ! command -v docker &> /dev/null; then | ||
echo "❌ Docker is not installed." | ||
echo "Please install Docker before running this script." | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$WSL_DISTRO_NAME" ]; then | ||
docker compose \ | ||
-f /opt/torizon-emulator-manager/docker-compose.yml \ | ||
run --rm torizon-emulator-manager | ||
else | ||
docker compose \ | ||
-f /opt/torizon-emulator-manager/docker-compose.wsl.yml \ | ||
run --rm torizon-emulator-manager-wsl | ||
fi |