Skip to content

Instantly share code, notes, and snippets.

@ku1ik
Last active August 29, 2015 14:07
Show Gist options
  • Save ku1ik/a3e410baf846d8233e00 to your computer and use it in GitHub Desktop.
Save ku1ik/a3e410baf846d8233e00 to your computer and use it in GitHub Desktop.
FROM ubuntu:14.04
RUN apt-get -y update
RUN apt-get -y install nginx
ADD example.conf /etc/nginx/conf.d/example.conf
RUN echo "daemon off;" >>/etc/nginx/nginx.conf
EXPOSE 3000
CMD ["/usr/sbin/nginx"]
server {
listen 80;
root /var/www/nginx;
try_files $uri/index.html $uri.html $uri @app;
location @app {
proxy_pass http://foobar;
}
}
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.box_check_update = false
config.vm.provision :shell, inline: <<EOS
set -e
# install docker
curl -sSL https://get.docker.io/ubuntu/ | sudo sh
# upgrade to 1.3.0 (testing)
curl -q -s -o /usr/bin/docker-1.3.0 https://test.docker.com/builds/Linux/x86_64/docker-1.3.0
chmod a+x /usr/bin/docker-1.3.0
mv /usr/bin/docker /usr/bin/docker-1.2.0
ln -s /usr/bin/docker-1.3.0 /usr/bin/docker
restart docker
sleep 3
docker version
# add vagrant to docker group
gpasswd -a vagrant docker
# build image
su - vagrant -c 'cd /vagrant && docker build -t test .'
EOS
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment