---
type: resource-type
title: DockerSecret
description: A secret definition in Docker Compose
name: DockerSecret
lexicon: docker
resource_type: Docker::Compose::Secret
---
A secret definition in Docker Compose

## Properties

- `file` (`string`): Path to the secret file
- `external` (`boolean`): Whether the secret is external
- `labels` (`Record<string, string>`): Secret labels
- `name` (`string`): Custom secret name
