Skip to content

3.9.0 Docker Build #1057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .mci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ functions:
echo "Building Debian Docker image"
make -C extras/docker/bookworm nocachebuild test
echo "Building Red Hat UBI Docker image"
make -C extras/docker/redhat-ubi-9.2 nocachebuild test
make -C extras/docker/redhat-ubi-9.3 nocachebuild test

#######################################
# Post Task #
Expand Down
4 changes: 2 additions & 2 deletions extras/docker/alpine3.18/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

FROM alpine:3.18 AS builder

ARG MONGOCXX_VERSION=3.8.1
ARG MONGOC_VERSION=1.24.4
ARG MONGOCXX_VERSION=3.9.0
ARG MONGOC_VERSION=1.25.1
ARG MONGOCRYPT_VERSION=1.8.2

WORKDIR /build
Expand Down
2 changes: 1 addition & 1 deletion extras/docker/alpine3.18/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DO NOT EDIT THIS FILE DIRECTLY
# This file was auto generated from the template file Makefile.j2 using the generate.py script

MONGOCXX_VERSION=3.8.1
MONGOCXX_VERSION=3.9.0
DOCKER=docker

.PHONY: build
Expand Down
2 changes: 1 addition & 1 deletion extras/docker/alpine3.18/TestDockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DO NOT EDIT THIS FILE DIRECTLY
# This file was auto generated from the template file TestDockerfile.j2 using the generate.py script

FROM mongodb/mongo-cxx-driver:3.8.1-alpine3.18
FROM mongodb/mongo-cxx-driver:3.9.0-alpine3.18

WORKDIR /build

Expand Down
4 changes: 2 additions & 2 deletions extras/docker/bookworm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

FROM debian:12-slim AS builder

ARG MONGOCXX_VERSION=3.8.1
ARG MONGOC_VERSION=1.24.4
ARG MONGOCXX_VERSION=3.9.0
ARG MONGOC_VERSION=1.25.1
ARG MONGOCRYPT_VERSION=1.8.2

WORKDIR /build
Expand Down
2 changes: 1 addition & 1 deletion extras/docker/bookworm/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DO NOT EDIT THIS FILE DIRECTLY
# This file was auto generated from the template file Makefile.j2 using the generate.py script

MONGOCXX_VERSION=3.8.1
MONGOCXX_VERSION=3.9.0
DOCKER=docker

.PHONY: build
Expand Down
2 changes: 1 addition & 1 deletion extras/docker/bookworm/TestDockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DO NOT EDIT THIS FILE DIRECTLY
# This file was auto generated from the template file TestDockerfile.j2 using the generate.py script

FROM mongodb/mongo-cxx-driver:3.8.1-bookworm
FROM mongodb/mongo-cxx-driver:3.9.0-bookworm

WORKDIR /build

Expand Down
16 changes: 8 additions & 8 deletions extras/docker/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from jinja2 import FileSystemLoader


MONGOCXX_VERSION = "3.8.1"
MONGOC_VERSION = "1.24.4"
MONGOCXX_VERSION = "3.9.0"
MONGOC_VERSION = "1.25.1"
MONGOCRYPT_VERSION = "1.8.2"


Expand All @@ -27,37 +27,37 @@ def render_template(template_filename, context):
"alpine3.18",
"bookworm",
"jammy",
"redhat-ubi-9.2",
"redhat-ubi-9.3",
]
base_image = {
"alpine3.18": "alpine:3.18",
"bookworm": "debian:12-slim",
"jammy": "ubuntu:22.04",
"redhat-ubi-9.2": "registry.access.redhat.com/ubi9/ubi-minimal:9.2",
"redhat-ubi-9.3": "registry.access.redhat.com/ubi9/ubi-minimal:9.3",
}
test_dependency_install_command = {
"alpine3.18": "apk update && apk upgrade && apk add --no-cache alpine-sdk",
"bookworm": "apt update && apt upgrade -y && apt install -y build-essential",
"jammy": "apt update && apt upgrade -y && apt install -y build-essential",
"redhat-ubi-9.2": "microdnf upgrade -y && microdnf install -y g++",
"redhat-ubi-9.3": "microdnf upgrade -y && microdnf install -y g++",
}
build_dependencies_install_command = {
"alpine3.18": "apk update && apk upgrade && apk add --no-cache alpine-sdk ninja cmake openssl-dev python3",
"bookworm": "apt update && apt upgrade -y && apt install -y ninja-build build-essential cmake git libssl-dev python3 wget",
"jammy": "apt update && apt upgrade -y && apt install -y ninja-build build-essential cmake git libssl-dev python3 wget",
"redhat-ubi-9.2": "microdnf upgrade -y && microdnf install -y ninja-build gcc g++ git gzip tar wget cmake openssl-devel python3",
"redhat-ubi-9.3": "microdnf upgrade -y && microdnf install -y ninja-build gcc g++ git gzip tar wget cmake openssl-devel python3",
}
runtime_dependencies_install_command = {
"alpine3.18": "apk update && apk upgrade && apk add --no-cache openssl3 libstdc++ libc6-compat",
"bookworm": "apt update && apt upgrade -y && apt install -y libssl3 && rm -rf /var/lib/apt/lists/*",
"jammy": "apt update && apt upgrade -y && apt install -y libssl3 && rm -rf /var/lib/apt/lists/*",
"redhat-ubi-9.2": "microdnf upgrade -y && microdnf install -y openssl",
"redhat-ubi-9.3": "microdnf upgrade -y && microdnf install -y openssl",
}
post_install_commands = {
"alpine3.18": "",
"bookworm": "\nRUN ldconfig\n",
"jammy": "\nRUN ldconfig\n",
"redhat-ubi-9.2": (
"redhat-ubi-9.3": (
"\n"
"RUN ldconfig\n"
"\n"
Expand Down
4 changes: 2 additions & 2 deletions extras/docker/jammy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

FROM ubuntu:22.04 AS builder

ARG MONGOCXX_VERSION=3.8.1
ARG MONGOC_VERSION=1.24.4
ARG MONGOCXX_VERSION=3.9.0
ARG MONGOC_VERSION=1.25.1
ARG MONGOCRYPT_VERSION=1.8.2

WORKDIR /build
Expand Down
2 changes: 1 addition & 1 deletion extras/docker/jammy/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DO NOT EDIT THIS FILE DIRECTLY
# This file was auto generated from the template file Makefile.j2 using the generate.py script

MONGOCXX_VERSION=3.8.1
MONGOCXX_VERSION=3.9.0
DOCKER=docker

.PHONY: build
Expand Down
2 changes: 1 addition & 1 deletion extras/docker/jammy/TestDockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DO NOT EDIT THIS FILE DIRECTLY
# This file was auto generated from the template file TestDockerfile.j2 using the generate.py script

FROM mongodb/mongo-cxx-driver:3.8.1-jammy
FROM mongodb/mongo-cxx-driver:3.9.0-jammy

WORKDIR /build

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# DO NOT EDIT THIS FILE DIRECTLY
# This file was auto generated from the template file Dockerfile.j2 using the generate.py script

FROM registry.access.redhat.com/ubi9/ubi-minimal:9.2 AS builder
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.3 AS builder

ARG MONGOCXX_VERSION=3.8.1
ARG MONGOC_VERSION=1.24.4
ARG MONGOCXX_VERSION=3.9.0
ARG MONGOC_VERSION=1.25.1
ARG MONGOCRYPT_VERSION=1.8.2

WORKDIR /build
Expand Down Expand Up @@ -60,7 +60,7 @@ RUN wget https://github.com/mongodb/mongo-cxx-driver/archive/refs/tags/r${MONGOC
cmake --build mongocxx-build --config RelWithDebInfo && \
cmake --install mongocxx-build --config RelWithDebInfo --prefix /opt/mongocxx

FROM registry.access.redhat.com/ubi9/ubi-minimal:9.2
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.3

RUN microdnf upgrade -y && microdnf install -y openssl

Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# DO NOT EDIT THIS FILE DIRECTLY
# This file was auto generated from the template file Makefile.j2 using the generate.py script

MONGOCXX_VERSION=3.8.1
MONGOCXX_VERSION=3.9.0
DOCKER=docker

.PHONY: build
build:
$(DOCKER) build . \
-t mongodb/mongo-cxx-driver:$(MONGOCXX_VERSION)-redhat-ubi-9.2
-t mongodb/mongo-cxx-driver:$(MONGOCXX_VERSION)-redhat-ubi-9.3

.PHONY: nocachebuild
nocachebuild:
$(DOCKER) build . \
--no-cache \
-t mongodb/mongo-cxx-driver:$(MONGOCXX_VERSION)-redhat-ubi-9.2
-t mongodb/mongo-cxx-driver:$(MONGOCXX_VERSION)-redhat-ubi-9.3

.PHONY: run
run: | $(filter nocachebuild build, $(MAKECMDGOALS))
$(DOCKER) run --rm -it mongodb/mongo-cxx-driver:$(MONGOCXX_VERSION)-redhat-ubi-9.2
$(DOCKER) run --rm -it mongodb/mongo-cxx-driver:$(MONGOCXX_VERSION)-redhat-ubi-9.3

.PHONY: test
test: | $(filter nocachebuild build, $(MAKECMDGOALS))
$(DOCKER) build . --no-cache -f TestDockerfile -t test-mongocxx-driver-image:$(MONGOCXX_VERSION)-redhat-ubi-9.2
$(DOCKER) run test-mongocxx-driver-image:$(MONGOCXX_VERSION)-redhat-ubi-9.2
$(DOCKER) build . --no-cache -f TestDockerfile -t test-mongocxx-driver-image:$(MONGOCXX_VERSION)-redhat-ubi-9.3
$(DOCKER) run test-mongocxx-driver-image:$(MONGOCXX_VERSION)-redhat-ubi-9.3
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DO NOT EDIT THIS FILE DIRECTLY
# This file was auto generated from the template file TestDockerfile.j2 using the generate.py script

FROM mongodb/mongo-cxx-driver:3.8.1-redhat-ubi-9.2
FROM mongodb/mongo-cxx-driver:3.9.0-redhat-ubi-9.3

WORKDIR /build

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
int main(void) {
mongocxx::instance inst{};
std::cout << "mongo-cxx-driver version: " << MONGOCXX_VERSION_STRING << std::endl;
std::cout << "THE redhat-ubi-9.2 IMAGE WORKS!" << std::endl;
std::cout << "THE redhat-ubi-9.3 IMAGE WORKS!" << std::endl;
}