# Service

- Module: [Aspire.Hosting.Docker](/reference/api/typescript/aspire.hosting.docker.md)
- Version: `13.2.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire)

## Definition

```typescript
interface Service {
  capAdd: List<string>;
  capDrop: List<string>;
  cgroupParent: string;
  command: List<string>;
  containerName: string;
  devices: List<string>;
  dns: List<string>;
  dnsSearch: List<string>;
  domainName: string;
  entrypoint: List<string>;
  envFile: List<string>;
  environment: Dict<string,string>;
  expose: List<string>;
  externalLinks: List<string>;
  extraHosts: Dict<string,string>;
  groupAdd: List<string>;
  hostname: string;
  image: string;
  init: boolean;
  ipc: string;
  isolation: string;
  labels: Dict<string,string>;
  links: List<string>;
  macAddress: string;
  name: string;
  networkMode: string;
  networks: List<string>;
  pid: string;
  ports: List<string>;
  profiles: List<string>;
  pullPolicy: string;
  readOnly: boolean;
  restart: string;
  securityOpt: List<string>;
  stdinOpen: boolean;
  stopGracePeriod: string;
  stopSignal: string;
  sysctls: Dict<string,string>;
  tmpfs: List<string>;
  tty: boolean;
  user: string;
  workingDir: string;
}
```

## Properties

- `capAdd`: `List<string>` `get - set` -- Gets the CapAdd property
- `capDrop`: `List<string>` `get - set` -- Gets the CapDrop property
- `cgroupParent`: `string` `get - set` -- Gets the CgroupParent property
- `command`: `List<string>` `get - set` -- Gets the Command property
- `containerName`: `string` `get - set` -- Gets the ContainerName property
- `devices`: `List<string>` `get - set` -- Gets the Devices property
- `dns`: `List<string>` `get - set` -- Gets the Dns property
- `dnsSearch`: `List<string>` `get - set` -- Gets the DnsSearch property
- `domainName`: `string` `get - set` -- Gets the DomainName property
- `entrypoint`: `List<string>` `get - set` -- Gets the Entrypoint property
- `envFile`: `List<string>` `get - set` -- Gets the EnvFile property
- `environment`: `Dict<string,string>` `get - set` -- Gets the Environment property
- `expose`: `List<string>` `get - set` -- Gets the Expose property
- `externalLinks`: `List<string>` `get - set` -- Gets the ExternalLinks property
- `extraHosts`: `Dict<string,string>` `get - set` -- Gets the ExtraHosts property
- `groupAdd`: `List<string>` `get - set` -- Gets the GroupAdd property
- `hostname`: `string` `get - set` -- Gets the Hostname property
- `image`: `string` `get - set` -- Gets the Image property
- `init`: `boolean` `get - set` -- Gets the Init property
- `ipc`: `string` `get - set` -- Gets the Ipc property
- `isolation`: `string` `get - set` -- Gets the Isolation property
- `labels`: `Dict<string,string>` `get - set` -- Gets the Labels property
- `links`: `List<string>` `get - set` -- Gets the Links property
- `macAddress`: `string` `get - set` -- Gets the MacAddress property
- `name`: `string` `get - set` -- Gets the Name property
- `networkMode`: `string` `get - set` -- Gets the NetworkMode property
- `networks`: `List<string>` `get - set` -- Gets the Networks property
- `pid`: `string` `get - set` -- Gets the Pid property
- `ports`: `List<string>` `get - set` -- Gets the Ports property
- `profiles`: `List<string>` `get - set` -- Gets the Profiles property
- `pullPolicy`: `string` `get - set` -- Gets the PullPolicy property
- `readOnly`: `boolean` `get - set` -- Gets the ReadOnly property
- `restart`: `string` `get - set` -- Gets the Restart property
- `securityOpt`: `List<string>` `get - set` -- Gets the SecurityOpt property
- `stdinOpen`: `boolean` `get - set` -- Gets the StdinOpen property
- `stopGracePeriod`: `string` `get - set` -- Gets the StopGracePeriod property
- `stopSignal`: `string` `get - set` -- Gets the StopSignal property
- `sysctls`: `Dict<string,string>` `get - set` -- Gets the Sysctls property
- `tmpfs`: `List<string>` `get - set` -- Gets the Tmpfs property
- `tty`: `boolean` `get - set` -- Gets the Tty property
- `user`: `string` `get - set` -- Gets the User property
- `workingDir`: `string` `get - set` -- Gets the WorkingDir property
