Stop using dockerfile/* images

As per
http://blog.docker.com/2015/03/updates-available-to-popular-repos-update-your-images/
docker has stopped answering dockerfile/redis and dockerfile/nginx.  Fix all
users in our tree.  Sadly this means a lot of published examples are now broken.
This commit is contained in:
Tim Hockin
2015-04-16 09:11:47 -07:00
parent 6c394e4d81
commit c2bacd588d
48 changed files with 119 additions and 103 deletions

View File

@@ -19,7 +19,7 @@ desiredState:
id: www
containers:
- name: nginx
image: dockerfile/nginx
image: nginx
```
A pod definition is a declaration of a _desired state_. Desired state is a very important concept in the Kubernetes model. Many things present a desired state to the system, and it is Kubernetes' responsibility to make sure that the current state matches the desired state. For example, when you create a Pod, you declare that you want the containers in it to be running. If the containers happen to not be running (e.g. program failure, ...), Kubernetes will continue to (re-)create them for you in order to drive them to the desired state. This process continues until you delete the Pod.
@@ -40,7 +40,7 @@ desiredState:
id: storage
containers:
- name: redis
image: dockerfile/redis
image: redis
volumeMounts:
# name must match the volume name below
- name: redis-persistent-storage
@@ -55,23 +55,23 @@ desiredState:
Ok, so what did we do? We added a volume to our pod:
```yaml
...
# ...
volumes:
- name: redis-persistent-storage
source:
emptyDir: {}
...
# ...
```
And we added a reference to that volume to our container:
```yaml
...
# ...
volumeMounts:
# name must match the volume name below
- name: redis-persistent-storage
# mount path within the container
mountPath: /data/redis
...
# ...
```
In Kubernetes, ```emptyDir``` Volumes live for the lifespan of the Pod, which is longer than the lifespan of any one container, so if the container fails and is restarted, our persistent storage will live on.
@@ -98,7 +98,7 @@ desiredState:
id: www
containers:
- name: nginx
image: dockerfile/nginx
image: nginx
volumeMounts:
- name: www-data
mountPath: /srv/www
@@ -114,7 +114,7 @@ desiredState:
volumes:
- name: www-data
source:
emptyDir
emptyDir: {}
```
Note that we have also added a volume here. In this case, the volume is mounted into both containers. It is marked ```readOnly``` in the web server's case, since it doesn't need to write to the directory.

View File

@@ -41,7 +41,7 @@ desiredState:
id: nginx
containers:
- name: nginx
image: dockerfile/nginx
image: nginx
ports:
- containerPort: 80
# Important: these labels need to match the selector above
@@ -135,7 +135,7 @@ desiredState:
id: php
containers:
- name: nginx
image: dockerfile/nginx
image: nginx
ports:
- containerPort: 80
# defines the health checking

View File

@@ -7,7 +7,7 @@ desiredState:
id: php
containers:
- name: nginx
image: dockerfile/nginx
image: nginx
ports:
- containerPort: 80
# defines the health checking

View File

@@ -7,4 +7,4 @@ desiredState:
id: www
containers:
- name: nginx
image: dockerfile/nginx
image: nginx

View File

@@ -7,7 +7,7 @@ desiredState:
id: storage
containers:
- name: redis
image: dockerfile/redis
image: redis
volumeMounts:
# name must match the volume name below
- name: redis-persistent-storage

View File

@@ -16,7 +16,7 @@ desiredState:
id: nginx
containers:
- name: nginx
image: dockerfile/nginx
image: nginx
ports:
- containerPort: 80
# Important: these labels need to match the selector above

View File

@@ -40,7 +40,7 @@ metadata:
spec:
containers:
- name: nginx
image: dockerfile/nginx
image: nginx
volumeMounts:
- mountPath: /srv/www
name: www-data

View File

@@ -5,7 +5,7 @@ metadata:
spec:
containers:
- name: nginx
image: dockerfile/nginx
image: nginx
# defines the health checking
livenessProbe:
# an http probe

View File

@@ -5,4 +5,4 @@ metadata:
spec:
containers:
- name: nginx
image: dockerfile/nginx
image: nginx

View File

@@ -5,7 +5,7 @@ metadata:
spec:
containers:
- name: redis
image: dockerfile/redis
image: redis
volumeMounts:
# name must match the volume name below
- name: redis-persistent-storage

View File

@@ -19,6 +19,6 @@ spec:
spec:
containers:
- name: nginx
image: dockerfile/nginx
image: nginx
ports:
- containerPort: 80