@nx-tools/nx-docker
Version:
## Upgrade from v1
96 lines (87 loc) • 1.78 kB
Markdown
- Option `file` defaults to a Dockerfile inside the current target application folder
- Rename `meta` option TO `metadata`
- Option `metadata.enabled` is not required, the metadata extraction is enabled when `metadata.images` is present
- @nx-tools/docker-metadata is now an optional dependency so need to be installed to use the metadata extraction
```json
// v1
{
"api": {
...
"docker": {
"executor": "@nx-tools/nx-docker:build",
"options": {
"file": "apps/api/Dockerfile",
"load": true,
"tags": ["your-org/api:latest", "your-org/api:v1"],
}
}
}
}
```
```json
// v2
{
"api": {
...
"docker": {
"executor": "@nx-tools/nx-docker:build",
"options": {
"load": true,
"tags": ["your-org/api:latest", "your-org/api:v1"],
}
}
}
}
```
```json
// v1
{
"api": {
...
"docker": {
"executor": "@nx-tools/nx-docker:build",
"options": {
"file": "apps/api/Dockerfile",
"load": true,
"meta": {
"enabled": true,
"images": ["your-org/api"],
"tags": [
"type=schedule",
"type=ref,event=branch",
"type=ref,event=tag",
"type=ref,event=pr"
]
}
}
}
}
}
```
```json
// v2
{
"api": {
...
"docker": {
"executor": "@nx-tools/nx-docker:build",
"options": {
"load": true,
"metadata": {
"images": ["your-org/api"],
"tags": [
"type=schedule",
"type=ref,event=branch",
"type=ref,event=tag",
"type=ref,event=pr"
]
}
}
}
}
}
```