* Renamed dockerImage to image
- Added a new image field and marked dockerImage as deprecated. Will remove in a future version.
- Fixes #122

* Removed dockerImage support

* Added dockerImage back to the docs
This commit is contained in:
David Fowler 2020-03-20 11:05:00 -07:00 коммит произвёл GitHub
Родитель 0d05542e3f
Коммит ebfae55f99
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 21 добавлений и 11 удалений

Просмотреть файл

@ -90,11 +90,11 @@ We just showed how `tye` makes it easier to communicate between 2 applications r
- name: frontend - name: frontend
project: frontend\frontend.csproj project: frontend\frontend.csproj
- name: redis - name: redis
dockerImage: redis image: redis
bindings: bindings:
- port: 6379 - port: 6379
- name: redis-cli - name: redis-cli
dockerImage: redis image: redis
args: "redis-cli -h host.docker.internal MONITOR" args: "redis-cli -h host.docker.internal MONITOR"
``` ```

Просмотреть файл

@ -21,7 +21,7 @@ services:
- name: worker - name: worker
project: worker/worker.csproj project: worker/worker.csproj
- name: rabbit - name: rabbit
dockerImage: rabbitmq:3-management image: rabbitmq:3-management
bindings: bindings:
- port: 5672 - port: 5672
protocol: rabbitmq protocol: rabbitmq
@ -97,7 +97,7 @@ services:
- port: 7000 - port: 7000
# a container service # a container service
- name: rabbit - name: rabbit
dockerImage: rabbitmq:3-management image: rabbitmq:3-management
bindings: bindings:
- port: 5672 - port: 5672
protocol: rabbitmq protocol: rabbitmq
@ -118,11 +118,21 @@ Including a `project` entry marks the service as a *project*:
- It will build and run locally using the .NET project during development. - It will build and run locally using the .NET project during development.
- It will be packaged and deployed during deployments. - It will be packaged and deployed during deployments.
#### `dockerImage` (string) #### `dockerImage` (string) (deprecated, use image instead)
The name and optional tag of an image that can be run using Docker. The name and optional tag of an image that can be run using Docker.
Including `dockerImage` marks the service as a *container*: Including `image` marks the service as a *container*:
- It will pulled and run locally using Docker during development.
- It will not be deployed during deployment.
#### `image` (string)
The name and optional tag of an image that can be run using Docker.
Including `image` marks the service as a *container*:
- It will pulled and run locally using Docker during development. - It will pulled and run locally using Docker during development.
- It will not be deployed during deployment. - It will not be deployed during deployment.
@ -217,7 +227,7 @@ Bindings should either provide:
```yaml ```yaml
name: myapplication name: myapplication
- name: rabbit - name: rabbit
dockerImage: rabbitmq:3-management image: rabbitmq:3-management
# bindings appear here # bindings appear here
bindings: bindings:

Просмотреть файл

@ -14,7 +14,7 @@ services:
- name: worker - name: worker
project: worker/worker.csproj project: worker/worker.csproj
- name: rabbit - name: rabbit
dockerImage: rabbitmq:3-management image: rabbitmq:3-management
bindings: bindings:
- port: 5672 - port: 5672
protocol: rabbitmq protocol: rabbitmq

Просмотреть файл

@ -32,9 +32,9 @@ namespace Microsoft.Tye.ConfigModel
{ {
runInfo = null; runInfo = null;
} }
else if (service.DockerImage is object) else if (service.Image is object)
{ {
var dockerRunInfo = new DockerRunInfo(service.DockerImage, service.Args); var dockerRunInfo = new DockerRunInfo(service.Image, service.Args);
foreach (var mapping in service.Volumes) foreach (var mapping in service.Volumes)
{ {

Просмотреть файл

@ -13,7 +13,7 @@ namespace Microsoft.Tye.ConfigModel
[Required] [Required]
public string Name { get; set; } = default!; public string Name { get; set; } = default!;
public bool External { get; set; } public bool External { get; set; }
public string? DockerImage { get; set; } public string? Image { get; set; }
public string? Project { get; set; } public string? Project { get; set; }
public bool? Build { get; set; } public bool? Build { get; set; }
public string? Executable { get; set; } public string? Executable { get; set; }