1
0
mirror of https://github.com/phusion/baseimage-docker.git synced 2026-03-26 04:18:46 +00:00

Compare commits

...

25 Commits

Author SHA1 Message Date
Hongli Lai (Phusion)
5ae32384d5 Document 0.9.9 release date 2014-03-25 17:18:16 +01:00
Hongli Lai (Phusion)
f55fde8d99 Fix a bug in the build process 2014-03-25 17:06:53 +01:00
Hongli Lai (Phusion)
0632b4865b Set the INITRD env variable and make 'ischroot' always return true.
This prevents initramfs and initscripts updates from breaking.
2014-03-25 16:44:33 +01:00
Hongli Lai (Phusion)
7914d8ac55 Enable more Ubuntu APT repositories. 2014-03-25 16:44:29 +01:00
Hongli Lai (Phusion)
73709ed0a0 During 'docker build', temporarily disable dpkg fsync to make it faster 2014-03-25 16:22:04 +01:00
Hongli Lai (Phusion)
dfaac83527 Run 'docker build' with '--rm' instead of '-rm', the latter which has been deprecated in Docker 0.9. 2014-03-25 15:49:46 +01:00
Hongli Lai (Phusion)
e11f2b8cfd Bump version to 0.9.9 2014-03-25 15:49:16 +01:00
Hongli Lai (Phusion)
fa3098206d Update Changelog 2014-03-25 15:48:05 +01:00
Hongli Lai (Phusion)
ad347d91c8 Merge branch 'amirgur1-master' 2014-03-25 15:37:18 +01:00
Hongli Lai (Phusion)
55727c2f30 Cleanup Amir Gur's patch 2014-03-25 15:36:15 +01:00
Hongli Lai (Phusion)
c8e79991b7 Merge branch 'master' of https://github.com/amirgur1/baseimage-docker into amirgur1-master 2014-03-25 15:30:00 +01:00
Hongli Lai
a03b58d94d Merge pull request #42 from rhacker/patch-1
Fix typo in Makefile
2014-03-19 10:49:41 +01:00
Dung Quang
ed89f20836 Update Makefile 2014-03-19 09:14:34 +07:00
Hongli Lai (Phusion)
fd8a1273ad Update Changelog 2014-03-17 12:59:03 +01:00
Hongli Lai
4094d20cec Merge pull request #38 from slawo-ch/patch-1
properly specify location of sftp-server binary
2014-03-17 12:57:51 +01:00
Slawomir Chodnicki
585932c74c properly specify location of sftp-server binary
Currently there is a symlink at /usr/lib/sftp-server to /usr/lib/openssh/sftp-server in the image. That seems to give trouble with packages like the rssh restricted shell, which will not follow a symlink to the sftp server binary for security reasons. So currently it is not possible to use this image as a basis for scp/sftp only access over ssh.
2014-03-15 18:08:28 +01:00
Hongli Lai
3366687e86 Merge pull request #35 from Laurent-Sarrazin/patch-1
Fix a typo
2014-03-14 11:54:15 +01:00
Laurent Sarrazin
b749352f1e Fix a typo 2014-03-12 23:27:50 +01:00
Hongli Lai
25d9972c0b Merge pull request #34 from felixhummel/typo
rw is enough for the insecure_key
2014-03-11 15:12:13 +01:00
Felix Hummel
5b1b6e8364 rw is enough for the insecure_key 2014-03-11 13:15:59 +01:00
Hongli Lai
0dab5aa4c8 Merge pull request #30 from ruphin/master
typo fix
2014-03-06 12:52:15 +01:00
Amir Gur
2ef5fa1659 * More Parametrization, example.
* All synced_folders are included.
 * Vagrantfile of baseimage and passenger are nearly identical now.  (I got to that when wanting to try passenger.  But already had a vagrant box started from baseimage, there was no need to dup the effort, just reuse the existing single box for all.  Then in end of day, may not need multiple Vagrantfiles.  Passenger is a simple structure/process for managing dockers, but only needing to use baseimage once and have one VM up)
2014-03-06 02:28:27 -08:00
Goffert van Gool
17cb4cebca typo fix 2014-03-06 02:54:37 +01:00
Amir Gur
ac7f9b0785 - Parametrized passenger-docker location 2014-03-04 14:33:57 -08:00
Amir Gur
d06b177508 - Parametrize
- Print docker version
- Add a d alias to docker
- Cleanup
2014-03-03 18:39:28 -08:00
9 changed files with 103 additions and 31 deletions

View File

@@ -1,3 +1,10 @@
## 0.9.9 (release date: 2014-03-25)
* Fixed a problem with rssh. (Slawomir Chodnicki)
* The `INITRD` environment variable is now set in the container by default. This prevents updates to the `initramfs` from running grub or lilo.
* The `ischroot` tool in Ubuntu has been modified to always return true. This prevents updates to the `initscripts` package from breaking /dev/shm.
* Various minor bug fixes, improvements and typo corrections. (Felix Hummel, Laurent Sarrazin, Dung Quang, Amir Gur)
## 0.9.8 (release date: 2014-02-26) ## 0.9.8 (release date: 2014-02-26)
* Fixed a regression in `my_init` which causes it to delete environment variables passed from Docker. * Fixed a regression in `my_init` which causes it to delete environment variables passed from Docker.

View File

@@ -1,12 +1,12 @@
NAME = phusion/baseimage NAME = phusion/baseimage
VERSION = 0.9.8 VERSION = 0.9.9
.PHONY: all build test tag_latest release ssh .PHONY: all build test tag_latest release ssh
all: build all: build
build: build:
docker build -t $(NAME):$(VERSION) -rm image docker build -t $(NAME):$(VERSION) --rm image
test: test:
env NAME=$(NAME) VERSION=$(VERSION) ./test/runner.sh env NAME=$(NAME) VERSION=$(VERSION) ./test/runner.sh
@@ -15,7 +15,7 @@ tag_latest:
docker tag $(NAME):$(VERSION) $(NAME):latest docker tag $(NAME):$(VERSION) $(NAME):latest
release: test tag_latest release: test tag_latest
@if ! docker images phusion/baseimage | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME) version $(VERSION) is not yet built. Please run 'make build'"; false; fi @if ! docker images $(NAME) | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME) version $(VERSION) is not yet built. Please run 'make build'"; false; fi
docker push $(NAME) docker push $(NAME)
@echo "*** Don't forget to create a tag. git tag rel-$(VERSION) && git push origin rel-$(VERSION)" @echo "*** Don't forget to create a tag. git tag rel-$(VERSION) && git push origin rel-$(VERSION)"

View File

@@ -131,7 +131,7 @@ You can add additional daemons (e.g. your own app) to the image by creating runi
The shell script must be called `run`, must be executable, and is to be placed in the directory `/etc/service/<NAME>`. The shell script must be called `run`, must be executable, and is to be placed in the directory `/etc/service/<NAME>`.
Here's an example showing you how to a memached server runit entry can be made. Here's an example showing you how a memached server runit entry can be made.
### In memcached.sh (make sure this file is chmod +x): ### In memcached.sh (make sure this file is chmod +x):
#!/bin/sh #!/bin/sh
@@ -313,7 +313,7 @@ Once you have the ID, look for its IP address with:
Now SSH into the container as follows: Now SSH into the container as follows:
curl -o insecure_key -fSL https://github.com/phusion/baseimage-docker/raw/master/image/insecure_key curl -o insecure_key -fSL https://github.com/phusion/baseimage-docker/raw/master/image/insecure_key
chmod 700 insecure_key chmod 600 insecure_key
ssh -i insecure_key root@<IP address> ssh -i insecure_key root@<IP address>
<a name="enabling_the_insecure_key_permanently"></a> <a name="enabling_the_insecure_key_permanently"></a>

55
Vagrantfile vendored
View File

@@ -1,31 +1,54 @@
# -*- mode: ruby -*- # -*- mode: ruby -*-
# vi: set ft=ruby : # vi: set ft=ruby :
ROOT = File.dirname(File.expand_path(__FILE__)) ROOT = File.dirname(File.absolute_path(__FILE__))
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2" VAGRANTFILE_API_VERSION = '2'
# Default env properties which can be overridden
# Example overrides:
# echo "ENV['PASSENGER_DOCKER_PATH'] ||= '../../phusion/passenger-docker' " >> ~/.vagrant.d/Vagrantfile
# echo "ENV['BASE_BOX_URL'] ||= 'd\:/dev/vm/vagrant/boxes/phusion/'" >> ~/.vagrant.d/Vagrantfile
BASE_BOX_URL = ENV['BASE_BOX_URL'] || 'https://oss-binaries.phusionpassenger.com/vagrant/boxes/'
VAGRANT_BOX_URL = ENV['VAGRANT_BOX_URL'] || BASE_BOX_URL + 'ubuntu-12.04.3-amd64-vbox.box'
VMWARE_BOX_URL = ENV['VMWARE_BOX_URL'] || BASE_BOX_URL + 'ubuntu-12.04.3-amd64-vmwarefusion.box'
BASEIMAGE_PATH = ENV['BASEIMAGE_PATH' ] || '.'
PASSENGER_DOCKER_PATH = ENV['PASSENGER_PATH' ] || '../passenger-docker'
DOCKERIZER_PATH = ENV['DOCKERIZER_PATH'] || '../dockerizer'
$script = <<SCRIPT
wget -q -O - https://get.docker.io/gpg | apt-key add -
echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list
apt-get update -qq
apt-get install -q -y --force-yes lxc-docker
usermod -a -G docker vagrant
docker version
su - vagrant -c 'echo alias d=docker >> ~/.bash_aliases'
SCRIPT
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "phusion-open-ubuntu-12.04-amd64" config.vm.box = 'phusion-open-ubuntu-12.04-amd64'
config.vm.box_url = "https://oss-binaries.phusionpassenger.com/vagrant/boxes/ubuntu-12.04.3-amd64-vbox.box" config.vm.box_url = VAGRANT_BOX_URL
config.ssh.forward_agent = true config.ssh.forward_agent = true
if File.directory?("#{ROOT}/../passenger-docker") passenger_docker_path = File.absolute_path(PASSENGER_DOCKER_PATH, ROOT)
config.vm.synced_folder File.expand_path("#{ROOT}/../passenger-docker"), if File.directory?(passenger_docker_path)
"/vagrant/passenger-docker" config.vm.synced_folder passenger_docker_path, '/vagrant/passenger-docker'
end
baseimage_path = File.absolute_path(BASEIMAGE_PATH, ROOT)
if File.directory?(baseimage_path)
config.vm.synced_folder baseimage_path, "/vagrant/baseimage-docker"
end
dockerizer_path = File.absolute_path(DOCKERIZER_PATH, ROOT)
if File.directory?(dockerizer_path)
config.vm.synced_folder dockerizer_path, '/vagrant/dockerizer'
end end
config.vm.provider :vmware_fusion do |f, override| config.vm.provider :vmware_fusion do |f, override|
override.vm.box_url = "https://oss-binaries.phusionpassenger.com/vagrant/boxes/ubuntu-12.04.3-amd64-vmwarefusion.box" override.vm.box_url = VMWARE_BOX_URL
f.vmx["displayName"] = "baseimage-docker" f.vmx['displayName'] = 'baseimage-docker'
end end
if Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/default/*/id").empty? if Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/default/*/id").empty?
# Add lxc-docker package config.vm.provision :shell, :inline => $script
pkg_cmd = "wget -q -O - https://get.docker.io/gpg | apt-key add -;" \
"echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list;" \
"apt-get update -qq; apt-get install -q -y --force-yes lxc-docker; "
# Add vagrant user to the docker group
pkg_cmd << "usermod -a -G docker vagrant; "
config.vm.provision :shell, :inline => pkg_cmd
end end
end end

View File

@@ -6,5 +6,7 @@ set -x
apt-get clean apt-get clean
rm -rf /build rm -rf /build
rm -rf /tmp/* /var/tmp/* rm -rf /tmp/* /var/tmp/*
rm -rf /var/lib/apt/lists/*
rm -f /etc/dpkg/dpkg.cfg.d/02apt-speedup
rm -f /etc/ssh/ssh_host_* rm -f /etc/ssh/ssh_host_*

View File

@@ -123,7 +123,7 @@ ChallengeResponseAuthentication no
#Banner none #Banner none
# override default of no subsystems # override default of no subsystems
Subsystem sftp /usr/lib/sftp-server Subsystem sftp /usr/lib/openssh/sftp-server
# Example of overriding settings on a per-user basis # Example of overriding settings on a per-user basis
#Match User anoncvs #Match User anoncvs

View File

@@ -21,7 +21,7 @@ else
| | | |
| DO NOT expose port 22 on the Internet unless you know what you are doing! | | DO NOT expose port 22 on the Internet unless you know what you are doing! |
| | | |
| Use the private key bellow to connect with user root | | Use the private key below to connect with user root |
+------------------------------------------------------------------------------+ +------------------------------------------------------------------------------+
EOF EOF

View File

@@ -3,22 +3,37 @@ set -e
source /build/buildconfig source /build/buildconfig
set -x set -x
## Enable Ubuntu Universe. ## Temporarily disable dpkg fsync to make building faster.
echo deb http://archive.ubuntu.com/ubuntu precise main universe > /etc/apt/sources.list echo force-unsafe-io > /etc/dpkg/dpkg.cfg.d/02apt-speedup
echo deb http://archive.ubuntu.com/ubuntu precise-updates main universe >> /etc/apt/sources.list
apt-get update
## Install HTTPS support for APT. ## Prevent initramfs updates from trying to run grub and lilo.
$minimal_apt_get_install apt-transport-https ## https://journal.paul.querna.org/articles/2013/10/15/docker-ubuntu-on-rackspace/
## http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594189
export INITRD=no
mkdir -p /etc/container_environment
echo -n no > /etc/container_environment/INITRD
## Enable Ubuntu Universe and Multiverse.
cp /build/sources.list /etc/apt/sources.list
apt-get update
## Fix some issues with APT packages. ## Fix some issues with APT packages.
## See https://github.com/dotcloud/docker/issues/1024 ## See https://github.com/dotcloud/docker/issues/1024
dpkg-divert --local --rename --add /sbin/initctl dpkg-divert --local --rename --add /sbin/initctl
ln -sf /bin/true /sbin/initctl ln -sf /bin/true /sbin/initctl
## Replace the 'ischroot' tool to make it always return true.
## Prevent initscripts updates from breaking /dev/shm.
## https://journal.paul.querna.org/articles/2013/10/15/docker-ubuntu-on-rackspace/
## https://bugs.launchpad.net/launchpad/+bug/974584
dpkg-divert --local --rename --add /usr/bin/ischroot
ln -sf /bin/true /usr/bin/ischroot
## Install HTTPS support for APT.
$minimal_apt_get_install apt-transport-https
## Upgrade all packages. ## Upgrade all packages.
echo "initscripts hold" | dpkg --set-selections apt-get dist-upgrade -y --no-install-recommends
apt-get upgrade -y --no-install-recommends
## Fix locale. ## Fix locale.
$minimal_apt_get_install language-pack-en $minimal_apt_get_install language-pack-en

25
image/sources.list Normal file
View File

@@ -0,0 +1,25 @@
deb http://archive.ubuntu.com/ubuntu precise main restricted
deb-src http://archive.ubuntu.com/ubuntu precise main restricted
deb http://archive.ubuntu.com/ubuntu precise-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu precise-updates main restricted
deb http://archive.ubuntu.com/ubuntu precise universe
deb-src http://archive.ubuntu.com/ubuntu precise universe
deb http://archive.ubuntu.com/ubuntu precise-updates universe
deb-src http://archive.ubuntu.com/ubuntu precise-updates universe
deb http://archive.ubuntu.com/ubuntu precise multiverse
deb-src http://archive.ubuntu.com/ubuntu precise multiverse
deb http://archive.ubuntu.com/ubuntu precise-updates multiverse
deb-src http://archive.ubuntu.com/ubuntu precise-updates multiverse
deb http://archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu precise-security main restricted
deb-src http://archive.ubuntu.com/ubuntu precise-security main restricted
deb http://archive.ubuntu.com/ubuntu precise-security universe
deb-src http://archive.ubuntu.com/ubuntu precise-security universe
deb http://archive.ubuntu.com/ubuntu precise-security multiverse
deb-src http://archive.ubuntu.com/ubuntu precise-security multiverse