Created
March 13, 2014 08:29
-
-
Save jdolitsky/9524334 to your computer and use it in GitHub Desktop.
Vagrant, Docker, & Jenkins
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Creates a Jenkins environment at http://localhost:3000 | |
VAGRANTFILE_API_VERSION = 2 | |
GUEST_JENKINS_PORT = 8080 | |
HOST_JENKINS_PORT = 3000 | |
JENKINS_DOCKER_IMAGE = "aespinosa/jenkins" | |
VM_BOX_NAME = "precise64" | |
VM_BOX_URL = "http://files.vagrantup.com/precise64.box" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = VM_BOX_NAME | |
config.vm.box_url = VM_BOX_URL | |
config.vm.network "forwarded_port", | |
guest: GUEST_JENKINS_PORT, | |
host: HOST_JENKINS_PORT | |
config.vm.provision "docker" do |d| | |
d.pull_images JENKINS_DOCKER_IMAGE | |
d.run JENKINS_DOCKER_IMAGE, | |
args: "-p #{GUEST_JENKINS_PORT}:#{GUEST_JENKINS_PORT}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment