Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Vagrant with Docker Engine
We need a Docker container engine which will enable us to run docker containers on OSX.
So the first step to get there is to create a Vagrant virtual machine image with the provider of your choice.
Vagrant.configure(2) do |config| = 'ubuntu/trusty64'
config.ssh.insert_key = false
config.vm.define 'container-engine' do |node|
node.vm.hostname = 'container-engine'
Ok let's spin up our container engine:
`vagrant up`
Check if you can connect to your running Vagrant box:
`vagrant ssh -c "exit"`
If we see get this, we know ssh is running successfully on our container engine:
`Connection to closed.`
docker-machine create -d generic \
--generic-ssh-user vagrant \
--generic-ssh-key ~/.vagrant.d/insecure_private_key \
--generic-ip-address \
FROM ruby:2.2.3
COPY . /srv/
RUN curl -sL | bash -
RUN apt-get install -y nodejs
RUN npm install -g rimraf
RUN npm install -g webpack
RUN npm install -g bower
RUN npm install
RUN npm run build
RUN bundle install
CMD ["bundle", "exec", "rackup"]
.dockerignore (put .vagrant in there)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment