Skip to content

Commit

Permalink
torizonEmulatorManager: Make sure to have the /mnt/wsl/docker.sock
Browse files Browse the repository at this point in the history
Signed-off-by: Matheus Castello <[email protected]>
  • Loading branch information
microhobby committed Jun 8, 2024
1 parent aee1f1f commit 96c9549
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
11 changes: 10 additions & 1 deletion cookbook/recipes-wsl/profile/profile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

echo "Welcome to the Torizon WSL 2 v0.0.9"
echo "Welcome to the Torizon WSL 2 v0.0.10"

export PATH

Expand Down Expand Up @@ -39,6 +39,15 @@ boot.ps1

# check the return code from the boot
if [ $? -eq 0 ] ; then
# check if there is the /mnt/wsl/docker.sock and is this is a socket file
if [ -S /mnt/wsl/docker.sock ]; then
echo "Docker is running!"
else
# create the symbolic link to the docker.sock for the other WSL2 instances
rm -rf /mnt/wsl/docker.sock
ln -sf /var/run/docker.sock /mnt/wsl/docker.sock
fi

mkdir -p ~/.log
# run the telemetry in the background
sudo -E /opt/telemetry/telemetry > ~/.log/telemetry.log 2>&1 & disown
Expand Down
5 changes: 5 additions & 0 deletions cookbook/recipes-wsl/simple-update/files
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
"file": "https://raw.githubusercontent.com/commontorizon/cookbook-torizon-wsl/main/cookbook/recipes-wsl/profile/profile",
"deploy": "/etc/profile",
"exec": true
},
{
"file": "https://raw.githubusercontent.com/commontorizon/cookbook-torizon-wsl/main/cookbook/recipes-wsl/simple-update/updater.ps1",
"deploy": "/opt/updater/updater.ps1",
"exec": true
}
]
}
2 changes: 1 addition & 1 deletion cookbook/recipes-wsl/simple-update/updater.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# then deploy the new files
##

$version = "v0.0.9-rc6"
$version = "v0.0.10-rc7"

try {
# 1. Check if there is a new version
Expand Down
2 changes: 1 addition & 1 deletion distro-amd64.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": {
"major": 0,
"minor": 0,
"patch": 9,
"patch": 10,
"build": 0
},
"maxImgSize": 4096,
Expand Down

0 comments on commit 96c9549

Please sign in to comment.