Skip to content

Commit

Permalink
mongodb C++ Support (#161)
Browse files Browse the repository at this point in the history
* Add mongodb c++ dependencies

* Update Dockerfile
  • Loading branch information
hhenry01 authored Sep 7, 2023
1 parent a45503a commit a5b55dd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/ubcsailbot/sailbot_workspace/dev:fix-mongodb-tools
FROM ghcr.io/ubcsailbot/sailbot_workspace/dev:mongodb-cpp

# Copy configuration files (e.g., .vimrc) from config/ to the container's home directory
ARG USERNAME=ros
Expand Down
12 changes: 12 additions & 0 deletions .devcontainer/base-dev/base-dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,23 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends \
mongodb-database-tools \
mongodb-mongosh \
libmongoc-dev \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*
ENV DEBIAN_FRONTEND=

# setup MongoDB C++ Packages
ENV DEBIAN_FRONTEND=noninteractive
# mongo-cxx-driver version must match libmongoc-dev version - see https://mongocxx.org/mongocxx-v3/installation/linux/
RUN wget https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.6.7/mongo-cxx-driver-r3.6.7.tar.gz \
&& tar -xzf mongo-cxx-driver-r3.6.7.tar.gz \
&& cd mongo-cxx-driver-r3.6.7/build \
&& cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local \
&& cmake --build . \
&& cmake --build . --target install
ENV DEBIAN_FRONTEND=

FROM local-base as ros-dev

# From https://github.com/athackst/dockerfiles/blob/32a872348af0ad25ec4a6e6184cb803357acb6ab/ros2/humble.Dockerfile
Expand Down
2 changes: 2 additions & 0 deletions .devcontainer/config/sailbot_workspace.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"cSpell.words": [
"athackst",
"autopep",
"bsoncxx",
"buildx",
"cmake",
"cppcheck",
Expand All @@ -54,6 +55,7 @@
"isort",
"kmph",
"mkdocs",
"mongocxx",
"noqa",
"OMPL",
"pallete",
Expand Down

0 comments on commit a5b55dd

Please sign in to comment.