Skip to content

Commit

Permalink
Ajusts label location
Browse files Browse the repository at this point in the history
  • Loading branch information
ragoso committed Mar 25, 2021
1 parent c62494f commit eeaea23
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Docker/DockerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public class ContainerSpec
{
public string Image { get; set; }
public List<Mount> Mounts { get; set; }

public IDictionary<string, string> Labels { get; set; }
public string User { get; set; }
}

Expand Down Expand Up @@ -134,7 +136,6 @@ public class DockerService
public Mode Mode { get; set; }
public UpdateConfig UpdateConfig { get; set; }
public EndpointSpec EndpointSpec { get; set; }
public IDictionary<string, string> Labels { get; set; }
}


Expand Down
2 changes: 1 addition & 1 deletion Docker/DockerServiceResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class DockerServiceResponse
[JsonIgnore]
public IEnumerable<string> Networks => Spec.TaskTemplate.Networks?.Select(x => x.Target);
[JsonIgnore]
public IDictionary<string, string> Labels => Spec.Labels;
public IDictionary<string, string> Labels => Spec.TaskTemplate.ContainerSpec.Labels;
[JsonIgnore]
public IEnumerable<Mount> Mounts => Spec.TaskTemplate.ContainerSpec.Mounts;
[JsonIgnore]
Expand Down
2 changes: 1 addition & 1 deletion Docker/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ public static DockerServiceResponse GetDockerService(this MyService myService)
Spec = new DockerService()
{
Name = myService.Name,
Labels = myService.Labels,
TaskTemplate = new TaskTemplate()
{
ContainerSpec = new ContainerSpec()
{
Image = myService.Image,
Labels = myService.Labels,
Mounts = myService.Volumes?.Select(x => new Mount()
{
ReadOnly = x.ReadOnly,
Expand Down

0 comments on commit eeaea23

Please sign in to comment.