Skip to content

Commit

Permalink
fix docker setup script
Browse files Browse the repository at this point in the history
  • Loading branch information
angelhof committed Apr 21, 2023
1 parent 92f1ca6 commit 66bb768
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ git clone --recurse-submodules https://github.com/binpash/dish.git

cd docker-hadoop
./setup-compose.sh # Creates the virtual cluster on the host machine
## The cluster can be torn down using `docker-compose down`
docker exec -it nodemanager1 bash # We will use this node as a client
```

## Running DiSh

__TODO:__ Needs improvement
__TODO__

From docker, we need to add some files to hdfs:

Expand Down
28 changes: 23 additions & 5 deletions scripts/setup-docker.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
#!/bin/bash -ex

# docker
sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt install -y docker-ce
# sudo apt update
# sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
# sudo apt install -y docker-ce
# sudo usermod -aG docker "${USER}"

sudo apt-get update
sudo apt-get install \
ca-certificates \
curl \
gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

sudo usermod -aG docker "${USER}"

echo "Don't forget to run" '`sudo su - ${USER}`'

0 comments on commit 66bb768

Please sign in to comment.