-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.sh
24 lines (20 loc) · 1.26 KB
/
script.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /bin/bash
sudo apt-get update
sudo apt-get install docker.io -y
sudo usermod -aG docker ubuntu
newgrp docker
sudo chmod 777 /var/run/docker.sock
docker run -d --name sonar -p 9000:9000 sonarqube:lts-community
sudo apt-get install wget apt-transport-https gnupg lsb-release
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -
echo deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list.d/trivy.list
sudo apt-get update
sudo apt-get install trivy
sudo apt update
sudo apt install fontconfig openjdk-17-jre -y
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] https://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update; sudo apt-get install jenkins -y;sudo systemctl start jenkins;sudo systemctl enable jenkins; sudo usermod -aG docker jenkins
# install the cloned version of netflix
git clone https://github.com/N4si/DevSecOps-Project.git; cd DevSecOps-Project; docker build --build-arg TMDB_V3_API_KEY=71061719c10df87c94da51725918446e -t netflix .
docker run -d --name netflix -p 8081:80 netflix:latest