docker pull larsks/mini-httpd
docker save larsks/mini-httpd |
glance image-create --container-format docker \
--disk-format raw --name larsks/mini-httpd --is-public True
nova boot --image larsks/mini-httpd --user-data /etc/bashrc httpd
Then run a shell inside the container:
docker exec -it <container_id> sh
And inside the container:
/ # apk add curl
(1/8) Installing run-parts (4.4-r0)
(2/8) Installing openssl (1.0.1k-r0)
ERROR: openssl-1.0.1k-r0: No error information
(3/8) Installing lua5.2-libs (5.2.3-r0)
(4/8) Installing lua5.2 (5.2.3-r0)
(5/8) Installing lua5.2-posix (32-r1)
(6/8) Installing ca-certificates (20141019-r0)
(7/8) Installing libssh2 (1.4.3-r0)
(8/8) Installing curl (7.39.0-r0)
Executing busybox-1.22.1-r14.trigger
Executing ca-certificates-20141019-r0.trigger
OK: 8 MiB in 26 packages
/ #
And then:
/ # curl http://169.254.169.254/latest/
You should see:
meta-data/
user-data/
Then try:
/ # curl http://169.254.169.254/openstack/latest/
You should see:
meta_data.json
user_data
password
Then try:
/ # curl http://169.254.169.254/openstack/latest/user_data
And you should see the contents of your /etc/bashrc
file.