Skip to content

Commit

Permalink
updated windows installation guide to omit docker-sync and use WSL 2 …
Browse files Browse the repository at this point in the history
…instead (#2272)
  • Loading branch information
TomasLudvik authored Mar 17, 2021
1 parent da1aee1 commit 9c02fd6
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 155 deletions.
111 changes: 0 additions & 111 deletions docker/conf/docker-compose-win.yml.dist

This file was deleted.

34 changes: 0 additions & 34 deletions docker/conf/docker-sync-win.yml.dist

This file was deleted.

41 changes: 41 additions & 0 deletions scripts/install-docker-wsl-debian.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

GREEN="\e[32m"
NC="\e[0m"

echo This is installation script that will install Docker in your Debian on Windows. You will be prompted to enter your password in order to install all necessary applications.

printf "${GREEN}Updating and installing necessary applications${NC}\n"

sudo apt update
sudo apt install -y --no-install-recommends apt-transport-https ca-certificates curl gnupg2 gnupg-agent software-properties-common wget lsb-release apt-transport-https

printf "${GREEN}Installing Docker for Debian${NC}\n"

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
sudo apt-get update -y && sudo apt-get install -y docker-ce docker-ce-cli containerd.io
sudo usermod -aG docker $USER

printf "${GREEN}Installing docker-compose 1.28.5${NC}\n"

sudo curl -L "https://github.com/docker/compose/releases/download/1.28.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

printf "${GREEN}Installing PHP 7.4${NC}\n"

wget https://packages.sury.org/php/apt.gpg
sudo apt-key add apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php7.list
sudo apt update
sudo apt install -y php7.4

printf "${GREEN}Installing Composer${NC}\n"

wget -O composer-setup.php https://getcomposer.org/installer
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer

printf "${GREEN}Installation successful${NC}\n"
12 changes: 2 additions & 10 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
numberRegex="^[0-9]+([.][0-9]+)?$"
operatingSystem=""
allowedValues=(1 2 3)
allowedValues=(1 2)
projectPathPrefix=""
echo This is installation script that will install demo Shopsys Framework application on docker with all required containers and with demo database created.

Expand All @@ -15,9 +15,8 @@ set -e

echo "Start with specifying your operating system: \
1) Linux
1) Linux or Windows with WSL 2
2) Mac
3) Windows
"

while [[ 1 -eq 1 ]]
Expand Down Expand Up @@ -66,13 +65,6 @@ case "$operatingSystem" in
mkdir -p ${projectPathPrefix}var/postgres-data ${projectPathPrefix}var/elasticsearch-data vendor
docker-sync start
;;
"3")
cp -f docker/conf/docker-compose-win.yml.dist docker-compose.yml
cp -f docker/conf/docker-sync-win.yml.dist docker-sync.yml

mkdir -p "${projectPathPrefix}var/postgres-data" "${projectPathPrefix}var/elasticsearch-data" vendor
docker-sync start
;;
esac

echo "Starting docker-compose.."
Expand Down

0 comments on commit 9c02fd6

Please sign in to comment.