Skip to content

Commit 5c5a3ac

Browse files
[CLOUDP-332196] Move Dockerfile for kubectl-plugin to cmd/kubectl-mongodb (#280)
# Summary Since we [moved](#271) the code for kubectl plugin to the dir `cmd/`, we also need to move the Dockerfile there. This PR does the same and moves the Dockerfile to the `cmd/kubectl-mongodb` dir. ## Proof of Work Go to the root of the repo and run the below command to build the image ```bash ~/work/opensource/mongodb-kubernetes (move-kplugin-dockerfile*) » docker build -t viveksinghggits/mongodb-mc-plugin:0.0.1 . -f cmd/kubectl-mongodb/Dockerfile vivek.s@M-HYXVRF7WDG [+] Building 11.5s (10/10) FINISHED docker:desktop-linux => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 309B 0.0s => [internal] load metadata for docker.io/library/golang:1.24 0.7s => [internal] load .dockerignore 0.0s => => transferring context: 1.16kB 0.0s => [builder 1/4] FROM docker.io/library/golang:1.24@sha256:14fd8a55e59a560704e5fc44970b301d00d344e45d6b914dda228e09f359a088 0.0s => => resolve docker.io/library/golang:1.24@sha256:14fd8a55e59a560704e5fc44970b301d00d344e45d6b914dda228e09f359a088 0.0s => [internal] load build context 0.1s => => transferring context: 172.97kB 0.1s => CACHED [builder 2/4] WORKDIR /go/src 0.0s => [builder 3/4] ADD . . 0.2s => [builder 4/4] RUN CGO_ENABLED=0 go build -a -buildvcs=false -o /go/bin/mongodb-multicluster 10.4s => CACHED [stage-1 1/1] COPY --from=builder /go/bin/mongodb-multicluster /go/bin/mongodb-multicluster 0.0s => exporting to image 0.0s => => exporting layers 0.0s => => exporting manifest sha256:f0d3ef2864de3f81ec287382c66a76897419bddb5337a4e2fb9b56b7e3ca14dc 0.0s => => exporting config sha256:ce9089ec4e89d1b2c2b3dd5edeb4053eaae95c62a3182e7c015dd4d63ecf6be2 0.0s => => exporting attestation manifest sha256:19f49f2aebd733e6a259441c81d0fef424c6af4fadf6f86e8032e77b7f1f3d51 0.0s => => exporting manifest list sha256:1574999c4354dbe1915980c0baf9aab438cbc59c7b909e34bf73b84ec98945e9 0.0s => => naming to docker.io/viveksinghggits/mongodb-mc-plugin:0.0.1 0.0s => => unpacking to docker.io/viveksinghggits/mongodb-mc-plugin:0.0.1 0.0s ``` ## Checklist - [x] Have you linked a jira ticket and/or is the ticket in the title? - [x] Have you checked whether your jira ticket required DOCSP changes? - [x] Have you checked for release_note changes?
1 parent 9a883c9 commit 5c5a3ac

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

public/tools/multicluster/Dockerfile renamed to cmd/kubectl-mongodb/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.24 as builder
1+
FROM golang:1.24 AS builder
22
WORKDIR /go/src
33
ADD . .
44

public/samples/multi-cluster-cli-gitops/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ To enable the manual disaster recovery using the CLI, this sample provides a [Jo
1313
The RBAC settings for the operator are typically creating using the CLI. In cases, where it is not possible, you can adjust and apply the YAML files from the [rbac](./resources/rbac) directory.
1414

1515
### Build the multi-cluster CLI image
16-
You can build a minimal image containing the CLI executable using the `Dockerfile` [provided in this repo](./../../tools/multicluster/Dockerfile).
16+
You can build a minimal image containing the CLI executable using the `Dockerfile` [provided in this path](../../../cmd/kubectl-mongodb/Dockerfile).
1717
``` shell
1818
git clone https://github.com/mongodb/mongodb-kubernetes
19-
cd mongodb-kubernetes/public/tools/multicluster
20-
docker build . -t "your-registry/multi-cluster-cli:latest"
19+
cd mongodb-kubernetes/
20+
docker build . -t "your-registry/multi-cluster-cli:latest" -f cmd/kubectl-mongodb/Dockerfile
2121
docker push "your-registry/multi-cluster-cli:latest"
2222
```

0 commit comments

Comments
 (0)