Skip to content

Commit 34e4a35

Browse files
jmrodriwking
andauthored
*: Replace 'docker build . -t ${IMG}' with '-t ${IMG} .' (#4466)
Because folks may have 'docker' aliased to 'podman', and Podman prefers options before positional arguments: $ podman build --help | grep CONTEXT-DIRECTORY podman build [command options] CONTEXT-DIRECTORY | URL We can't change the v2 sample since it still uses the old format. Co-authored-by: W. Trevor King <wking@tremily.us> Signed-off-by: jesus m. rodriguez <jmrodri@gmail.com> Co-authored-by: W. Trevor King <wking@tremily.us>
1 parent 67358fb commit 34e4a35

File tree

5 files changed

+32
-4
lines changed

5 files changed

+32
-4
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
(ansible/v1, helm/v1) Post-fixed positional directory argument `.` in `docker-build` make target to align with `podman`
6+
kind: "change"
7+
breaking: false
8+
9+
# Migration can be defined to automatically add a section to
10+
# the migration guide. This is required for breaking changes.
11+
migration:
12+
header: Move positional directory argument `.` in `docker-build` make target
13+
body: >
14+
The directory argument `.` in the `docker-build` make target was moved to the
15+
last positional argument to align with `podman`'s expectations, making substitution
16+
cleaner. In your `Makefile`, change:
17+
18+
docker build . -t ${IMG}
19+
20+
to
21+
docker build -t ${IMG} .
22+
23+
Alternatively, you could replace it programmatically
24+
25+
```sh
26+
sed -i 's/docker build . -t ${IMG}/docker build -t ${IMG} ./' $(git grep -l 'docker.*build \. ')
27+
```
28+

internal/plugins/ansible/v1/scaffolds/internal/templates/makefile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ undeploy: kustomize
9393
9494
# Build the docker image
9595
docker-build:
96-
docker build . -t ${IMG}
96+
docker build -t ${IMG} .
9797
9898
# Push the docker image
9999
docker-push:

internal/plugins/helm/v1/scaffolds/internal/templates/makefile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ undeploy: kustomize
9393
9494
# Build the docker image
9595
docker-build:
96-
docker build . -t ${IMG}
96+
docker build -t ${IMG} .
9797
9898
# Push the docker image
9999
docker-push:

testdata/ansible/memcached-operator/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ undeploy: kustomize
5656

5757
# Build the docker image
5858
docker-build:
59-
docker build . -t ${IMG}
59+
docker build -t ${IMG} .
6060

6161
# Push the docker image
6262
docker-push:

testdata/helm/memcached-operator/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ undeploy: kustomize
5656

5757
# Build the docker image
5858
docker-build:
59-
docker build . -t ${IMG}
59+
docker build -t ${IMG} .
6060

6161
# Push the docker image
6262
docker-push:

0 commit comments

Comments
 (0)