Panagiotis_Klironomos
4 years ago
1 changed files with 60 additions and 2 deletions
@ -1,3 +1,61 @@ |
|||
# Swarmlab_Sec |
|||
|
|||
[![asciicast](https://asciinema.org/a/373216.svg)](https://asciinema.org/a/373216) |
|||
|
|||
|
|||
## Εργαστήριο Ασφάλειας Δικτύων |
|||
|
|||
Εργαστηριακά Βήματα Μαθημάτων |
|||
|
|||
|
|||
|
|||
## 1. **Docker Installation** |
|||
|
|||
``` |
|||
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 $(lsb_release -cs) stable" |
|||
sudo apt update |
|||
|
|||
sudo apt install docker* |
|||
echo "or" |
|||
sudo apt install -y docker-ce |
|||
|
|||
sudo systemctl status docker |
|||
sudo usermod -aG docker username #οπου username το όνομα του χρήστη που θα δουλεύει με docker |
|||
``` |
|||
|
|||
**1.1 docker compose** |
|||
|
|||
``` |
|||
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose |
|||
sudo chmod +x /usr/local/bin/docker-compose |
|||
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose |
|||
``` |
|||
**1.2 certificate** |
|||
|
|||
``` |
|||
$ sudo su |
|||
# touch set-ca.sh |
|||
``` |
|||
|
|||
- **copy-paste lines into set-ca .sh file** |
|||
|
|||
|
|||
``` |
|||
registry_address=registry.vlabs.uniwa.gr |
|||
registry_port=5043 |
|||
mkdir -p /etc/docker/certs.d/$registry_address:$registry_port |
|||
openssl s_client -showcerts -connect $registry_address:$registry_port < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /etc/docker/certs.d/$registry_address:$registry_port/ca.crt |
|||
registry_port=5080 |
|||
mkdir -p /etc/docker/certs.d/$registry_address:$registry_port |
|||
openssl s_client -showcerts -connect $registry_address:$registry_port < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /etc/docker/certs.d/$registry_address:$registry_port/ca.crt |
|||
|
|||
registry_address=hub.swarmlab.io |
|||
registry_port=5443 |
|||
mkdir -p /etc/docker/certs.d/$registry_address:$registry_port |
|||
openssl s_client -showcerts -connect $registry_address:$registry_port < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /etc/docker/certs.d/$registry_address:$registry_port/ca.crt |
|||
|
|||
registry_port=5480 |
|||
mkdir -p /etc/docker/certs.d/$registry_address:$registry_port |
|||
openssl s_client -showcerts -connect $registry_address:$registry_port < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /etc/docker/certs.d/$registry_address:$registry_port/ca.crt |
|||
``` |
|||
|
|||
[![asciicast](https://asciinema.org/a/373216.svg)](https://asciinema.org/a/373216) |
|||
|
Loading…
Reference in new issue