Skip to content

Instantly share code, notes, and snippets.

@himlohiya
Created June 6, 2014 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save himlohiya/9b4ee952c6a51fd6de23 to your computer and use it in GitHub Desktop.
Save himlohiya/9b4ee952c6a51fd6de23 to your computer and use it in GitHub Desktop.
#!/bin/bash
# exit on any error
set -o errexit
# exit if an uninitialised variable is used.
set -o nounset
# install nginx.
sudo apt-get install -y nginx
sudo apt-get upgrade
echo "upstream app {
server 127.0.0.1:49001;
}
server {
listen 9765;
server_name build.ezetap.com;
location / {
proxy_pass http://app;
}
}" > /etc/nginx/sites-available/ezetapJenkins
sudo ln -sf /etc/nginx/sites-available/ezetapJenkins /etc/nginx/sites-enabled/ezetapJenkins
sudo service nginx restart
# install docker.
sudo apt-get install docker.io
# pull jenkins image.
docker.io pull zaiste/jenkins
# run docker jenkins image.
# run docker image 49001 port is exposed as 8080 port.
docker.io run -d -p 49001:8080 -v $PWD/jenkins:/var/lib/jenkins -t zaiste/jenkins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment