mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-02-14 17:49:59 +00:00
Replace registry:2 with registry
registry used to be registry v1, but now it defaults to v2. We can therefore drop the tag.
This commit is contained in:
@@ -50,8 +50,7 @@ In this part, we will:
|
|||||||
|
|
||||||
## Using the open source registry
|
## Using the open source registry
|
||||||
|
|
||||||
- We need to run a `registry:2` container
|
- We need to run a `registry` container
|
||||||
<br/>(make sure you specify tag `:2` to run the new version!)
|
|
||||||
|
|
||||||
- It will store images and layers to the local filesystem
|
- It will store images and layers to the local filesystem
|
||||||
<br/>(but you can add a config file to use S3, Swift, etc.)
|
<br/>(but you can add a config file to use S3, Swift, etc.)
|
||||||
@@ -75,7 +74,7 @@ In this part, we will:
|
|||||||
|
|
||||||
- Create the registry service:
|
- Create the registry service:
|
||||||
```bash
|
```bash
|
||||||
kubectl run registry --image=registry:2
|
kubectl run registry --image=registry
|
||||||
```
|
```
|
||||||
|
|
||||||
- Expose it on a NodePort:
|
- Expose it on a NodePort:
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ We need a registry to move images around.
|
|||||||
Without a stack file, it would be deployed with the following command:
|
Without a stack file, it would be deployed with the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker service create --publish 5000:5000 registry:2
|
docker service create --publish 5000:5000 registry
|
||||||
```
|
```
|
||||||
|
|
||||||
Now, we are going to deploy it with the following stack file:
|
Now, we are going to deploy it with the following stack file:
|
||||||
@@ -73,7 +73,7 @@ version: "3"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
registry:
|
registry:
|
||||||
image: registry:2
|
image: registry
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
# Hosting our own registry
|
# Hosting our own registry
|
||||||
|
|
||||||
- We need to run a `registry:2` container
|
- We need to run a `registry` container
|
||||||
<br/>(make sure you specify tag `:2` to run the new version!)
|
|
||||||
|
|
||||||
- It will store images and layers to the local filesystem
|
- It will store images and layers to the local filesystem
|
||||||
<br/>(but you can add a config file to use S3, Swift, etc.)
|
<br/>(but you can add a config file to use S3, Swift, etc.)
|
||||||
@@ -28,7 +27,7 @@
|
|||||||
|
|
||||||
- Create the registry service:
|
- Create the registry service:
|
||||||
```bash
|
```bash
|
||||||
docker service create --name registry --publish 5000:5000 registry:2
|
docker service create --name registry --publish 5000:5000 registry
|
||||||
```
|
```
|
||||||
|
|
||||||
- Now try the following command; it should return `{"repositories":[]}`:
|
- Now try the following command; it should return `{"repositories":[]}`:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ version: "3"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
registry:
|
registry:
|
||||||
image: registry:2
|
image: registry
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user