Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
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
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!
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| = "ubuntu/trusty64"
config.vm.box_check_update = false
config.vm.provision :shell, inline: <<EOS
set -e
# install docker
curl -sSL | sudo sh
# upgrade to 1.3.0 (testing)
curl -q -s -o /usr/bin/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 .'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment