Last active
August 29, 2015 14:07
-
-
Save ku1ik/a3e410baf846d8233e00 to your computer and use it in GitHub Desktop.
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
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"] |
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
server { | |
listen 80; | |
root /var/www/nginx; | |
try_files $uri/index.html $uri.html $uri @app; | |
location @app { | |
proxy_pass http://foobar; | |
} | |
} |
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
# -*- 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