Skip to content

Commit 56a5822

Browse files
committed
Fix issue generating manifests due to Docker perms
This patch fixes an issue with generating manifests using the manifests image due to Docker permissions.
1 parent 127436f commit 56a5822

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

docs/getting_started.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ With the above environment variable file it is now possible to generate the mani
9494

9595
```shell
9696
$ docker run --rm \
97+
--user "$(id -u):$(id -g)" \
9798
-v "$(pwd)/management-cluster":/out \
9899
-v "$(pwd)/envvars.txt":/out/envvars.txt:ro \
99100
gcr.io/cluster-api-provider-vsphere/release/manifests:latest \
@@ -142,6 +143,7 @@ Using the same Docker command as above, generate resources for a new cluster, th
142143

143144
```shell
144145
docker run --rm \
146+
--user "$(id -u):$(id -g)" \
145147
-v "$(pwd)/workload-cluster-1":/out \
146148
-v "$(pwd)/envvars.txt":/out/envvars.txt:ro \
147149
gcr.io/cluster-api-provider-vsphere/release/manifests:latest \

hack/tools/generate-yaml/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ COPY ./vendor/sigs.k8s.io/cluster-api/config ./vendor/sigs.k8s.io/cluster-api/co
4949
# Copy in the examples directory.
5050
COPY ./cmd/clusterctl/examples/vsphere/*.template ./cmd/clusterctl/examples/vsphere/
5151

52+
# Ensure all the directories in the /build directory are writeable.
53+
RUN find . -type d -exec chmod 0777 \{\} \;
54+
5255
# This build arg specifies the value of the -m flag for generate-yaml.sh, the
5356
# CAPV manager image inserted into the generated provider components.
5457
ARG CAPV_MANAGER_IMAGE=gcr.io/cnx-cluster-api/vsphere-cluster-api-provider:latest

0 commit comments

Comments
 (0)