move apt-get update before apt-get

This commit is contained in:
Edward Viaene
2020-09-17 22:11:36 +02:00
parent 277b73136b
commit 75fa9b4cd8
+1 -1
View File
@@ -25,12 +25,12 @@ echo '/dev/data/volume1 /var/lib/jenkins ext4 defaults 0 0' >> /etc/fstab
mount /var/lib/jenkins mount /var/lib/jenkins
# install default-jre (needed for ubuntu 18.04) # install default-jre (needed for ubuntu 18.04)
apt-get update
apt-get install -y default-jre apt-get install -y default-jre
# install jenkins and docker # install jenkins and docker
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
echo "deb http://pkg.jenkins.io/debian-stable binary/" >> /etc/apt/sources.list echo "deb http://pkg.jenkins.io/debian-stable binary/" >> /etc/apt/sources.list
apt-get update
apt-get install -y jenkins=${JENKINS_VERSION} unzip docker.io apt-get install -y jenkins=${JENKINS_VERSION} unzip docker.io
# enable docker and add perms # enable docker and add perms