You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 18, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+24-5Lines changed: 24 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Repository to help getting started with MongoDB Java driver connecting to MongoD
4
4
5
5
## Information
6
6
7
-
This Get-Started project uses [MongoDB Java driver](https://mongodb.github.io/mongo-java-driver/) version 4.1.1 by default. Although you can change the driver version, the provided code example was only tested against the default version of MongoDB driver. There is no guarantee that the code sample will work for all possible versions of the driver.
7
+
This Get-Started project uses [MongoDB Java driver](https://mongodb.github.io/mongo-java-driver/) version 4.1.1 (sync) by default. Although you can change the driver version, the provided code example was only tested against the default version of MongoDB driver. There is no guarantee that the code sample will work for all possible versions of the driver.
8
8
9
9
## Pre-requisites
10
10
@@ -16,7 +16,27 @@ Have Docker running on your machine. You can download and install from: https://
16
16
17
17
In order to execute the code example, you need to specify `MONGODB_URI` environment variable to connect to a MongoDB cluster. If you don't have any you can create one by signing up [MongoDB Atlas Free-tier M0](https://docs.atlas.mongodb.com/getting-started/).
18
18
19
-
## Build Steps
19
+
## Execution Steps
20
+
21
+
1. Build Docker image with a tag name. Within the top level directory execute:
22
+
```
23
+
docker build . -t start-java
24
+
```
25
+
This will build a docker image with a tag name `start-java`.
26
+
27
+
2. Execute the helper shell script followed by the MongoDB URI that you would like to connect to.
### Change driver version from within the Docker environment
66
+
#### Change driver version from within the Docker environment
48
67
49
68
You can change the version of `mongo-driver-sync` before code compilation time by modifying the [pom.xml: mongo-java-driver version](java/pom.xml#L11).
0 commit comments