Add all files to repository
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
@echo off
|
||||
echo Adding official Docker repository...
|
||||
wsl -d Ubuntu-22.04 bash -c "sudo apt-get update && sudo apt-get install -y ca-certificates curl gnupg lsb-release"
|
||||
wsl -d Ubuntu-22.04 bash -c "sudo install -m 0755 -d /etc/apt/keyrings"
|
||||
wsl -d Ubuntu-22.04 bash -c "curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg"
|
||||
wsl -d Ubuntu-22.04 bash -c "echo 'deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable' | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null"
|
||||
|
||||
echo Installing Docker Engine 28.3.2 + Docker Compose V2...
|
||||
wsl -d Ubuntu-22.04 bash -c "sudo apt-get update && sudo apt-get install -y docker-ce=5:28.3.2-1~ubuntu.22.04~jammy docker-ce-cli=5:28.3.2-1~ubuntu.22.04~jammy containerd.io docker-compose-plugin"
|
||||
|
||||
echo Holding Docker packages to prevent auto-upgrade...
|
||||
wsl -d Ubuntu-22.04 bash -c "sudo apt-mark hold docker-ce docker-ce-cli containerd.io"
|
||||
|
||||
echo Enabling Docker daemon...
|
||||
wsl -d Ubuntu-22.04 bash -c "sudo systemctl enable docker && sudo systemctl start docker"
|
||||
|
||||
echo ============================================
|
||||
echo Setup complete! Checking versions...
|
||||
wsl -d Ubuntu-22.04 bash -c "docker --version"
|
||||
wsl -d Ubuntu-22.04 bash -c "docker compose version"
|
||||
echo ============================================
|
||||
pause
|
||||
@@ -0,0 +1,27 @@
|
||||
@echo off
|
||||
REM ============================================
|
||||
REM Clone source code and start Docker Compose
|
||||
REM ============================================
|
||||
|
||||
echo Login docker
|
||||
wsl -d Ubuntu-22.04 bash -c "sudo docker login gitea.digitoolsolutions.synology.me"
|
||||
|
||||
echo [1/3] Copying files into WSL...
|
||||
REM Create ~/walmart folder in WSL
|
||||
wsl -d Ubuntu-22.04 bash -c "mkdir -p ~/walmart"
|
||||
|
||||
REM Copy docker-compose.yml and .env from Windows to WSL
|
||||
wsl -d Ubuntu-22.04 bash -c "cp /mnt/c/Apps/mini-pc-setup/compose.yml ~/walmart/"
|
||||
wsl -d Ubuntu-22.04 bash -c "cp /mnt/c/Apps/mini-pc-setup/.env ~/walmart/"
|
||||
|
||||
echo [2/3] Starting containers...
|
||||
wsl -d Ubuntu-22.04 bash -c "cd ~/walmart && sudo docker compose up -d"
|
||||
|
||||
echo [3/3] Showing running containers...
|
||||
wsl -d Ubuntu-22.04 bash -c "sudo docker ps"
|
||||
|
||||
echo ============================================
|
||||
echo Project 'walmart' is up and running!
|
||||
echo ============================================
|
||||
|
||||
pause
|
||||
@@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
echo Installing WSL with Ubuntu-22.04...
|
||||
wsl --install -d Ubuntu-22.04
|
||||
echo Please reboot your computer and create your Ubuntu user before continuing.
|
||||
pause
|
||||
@@ -0,0 +1,26 @@
|
||||
@echo off
|
||||
|
||||
echo ============================================
|
||||
echo Updating Walmart containers...
|
||||
echo ============================================
|
||||
|
||||
echo [1/4] Update config...
|
||||
wsl -d Ubuntu-22.04 bash -c "cp /mnt/c/Apps/mini-pc-setup/compose.yml ~/walmart/"
|
||||
wsl -d Ubuntu-22.04 bash -c "cp /mnt/c/Apps/mini-pc-setup/.env ~/walmart/"
|
||||
|
||||
echo [2/4] Pull latest images...
|
||||
wsl -d Ubuntu-22.04 bash -c "cd ~/walmart && sudo docker compose pull"
|
||||
|
||||
echo [3/4] Restart containers...
|
||||
wsl -d Ubuntu-22.04 bash -c "cd ~/walmart && sudo docker compose up -d"
|
||||
|
||||
echo [4/4] Remove unused images...
|
||||
wsl -d Ubuntu-22.04 bash -c "sudo docker image prune -af"
|
||||
|
||||
pause
|
||||
echo.
|
||||
echo ============================================
|
||||
echo Walmart update completed!
|
||||
echo ============================================
|
||||
|
||||
pause
|
||||
Reference in New Issue
Block a user