Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Commit e342a5c

Browse files
committed
wip
1 parent 17ce7c2 commit e342a5c

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

docker/dockerfile_generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ def e2e_params():
2626

2727
def unit_test_params():
2828
return {
29-
"base_image": "golang:alpine",
29+
"base_image": "golang",
3030
}
3131

3232

33-
def render(image_name: str):
33+
def render(image_name):
3434
param_dict = {
3535
"unittest": unit_test_params(),
3636
"e2e": e2e_params(),

docker/templates/Dockerfile.operator

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
{% extends "Dockerfile.template" %}
22

3+
{% block build_binary -%}
4+
# TODO: This build takes longer than it needs to and can still be optimized
5+
RUN go build -o build/_output/bin/mongodb-kubernetes-operator -mod=vendor github.com/mongodb/mongodb-kubernetes-operator/cmd/manager
6+
7+
ENV manifest_version=4.2
8+
RUN mkdir -p /content/ \
9+
&& chmod -R +r /content/ \
10+
&& curl --fail --retry 3 -o /content/version_manifest.json "https://opsmanager.mongodb.com/static/version_manifest/${manifest_version}.json"
11+
{% endblock -%}
12+
313
{% block packages -%}
414
RUN apk add --update curl
515
{% endblock -%}
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{% extends "Dockerfile.template" %}
22

3-
{% block packages -%}
4-
RUN apk add --update curl
5-
{% endblock -%}
6-
73
{% block command -%}
84
CMD ["go", "test", "./pkg/..."]
95
{% endblock -%}

scripts/ci/build_and_push_image.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
echo ${quay_password} | docker login -u=${quay_user_name} quay.io --password-stdin
44

55
python docker/dockerfile_generator.py ${image_type} > Dockerfile
6-
docker build . -f ${dockerfile} -t ${image}
6+
docker build . -f Dockerfile -t ${image}
77
docker push ${image}

0 commit comments

Comments
 (0)