Skip to content

Instantly share code, notes, and snippets.

@hyzhak
Created October 25, 2014 11:58
Show Gist options
  • Select an option

  • Save hyzhak/6b761f6c4f0d00a12eb2 to your computer and use it in GitHub Desktop.

Select an option

Save hyzhak/6b761f6c4f0d00a12eb2 to your computer and use it in GitHub Desktop.
Hello World Test Docker. Try to echo "Hello World!!" to console
# Use phusion/baseimage as base image. To make your builds
# reproducible, make sure you lock down to a specific version, not
# to `latest`! See
# https://github.com/phusion/baseimage-docker/blob/master/Changelog.md
# for a list of version numbers.
FROM phusion/baseimage:0.9.15
MAINTAINER hyzhaka@gmail.com
# Set correct environment variables.
ENV HOME /root
# Regenerate SSH host keys. baseimage-docker does not contain any, so you
# have to do that yourself. You may also comment out this instruction; the
# init system will auto-generate one during boot.
RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
# ...put your own build instructions here...
RUN echo "Hello World!!"
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "phusion/ubuntu-14.04-amd64"
config.vm.provision "docker" do |d|
d.build_image "/home/vagrant/dockers/test-docker",
args: "-t 'hyzhak/test-docker'"
d.run "hyzhak/test-docker",
args: "--name='test-docker'",
daemonize: false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment