<commit_before># mongodb-3.4
A docker mongodb version 3.4 with user, password and engine options.

MongoDB version/history
---------------

Version 3.4. 

Originally this came from the now depreciated tatum/mongodb docker repo. Forked and upgraded to v3.4.


Usage
-----

To create the image `dubc/mongodb-3.4`, execute the following command on the mongodb-3.4 folder:

        docker build -t dubc/mongodb-3.4 .


Running the MongoDB server
--------------------------

Run the following command to start MongoDB:

        docker run -d -p 27017:27017 -p 28017:28017 --name mongodb-3.4 dubc/mongodb-3.4

The first time that you run your container, a new random password will be set.
To get the password, check the logs of the container by running:

        docker logs <CONTAINER_ID>

You will see an output like the following:

        ========================================================================
        You can now connect to this MongoDB server using:

            mongo admin -u admin -p 5elsT6KtjrqV --host <host> --port <port>

        Please remember to change the above password as soon as possible!
        ========================================================================

In this case, `<PASSWORD>` is the password set.
You can then connect to MongoDB:

         mongo admin -u admin -p 5elsT6KtjrqV

Done!


Setting a specific password for the admin account
-------------------------------------------------

If you want to use a preset password instead of a randomly generated one, you can
set the environment variable `MONGODB_PASS` to your specific password when running the container:

        docker run -d -p 27017:27017 -p 28017:28017 -e MONGODB_PASS="<PASSWORD>" --name mongo-3.4 dubc/mongodb-3.4

You can now test your new admin password:

        mongo admin -u admin -p mypass
        curl --user admin:mypass --digest http://localhost:28017/


Setting a specific user:database
--------------------------------

If you want to use another database with another user

    docker run -d -p 27017:27017 -p 28017:28017 -e MONGODB_USER="user" -e MONGODB_DATABASE="mydatabase" -e MONGODB_PASS="<PASSWORD>" --name mongo-3.4 dubc/mongodb

You can now test your new credentials:

    mongo mydatabase -u user -p mypass

Note: with mongo 3.x an admin user is also created with the same credentials

    mongo admin -u user -p mypass

Run MongoDB without password
----------------------------

If you want to run MongoDB without password you can set the environment variable `AUTH` to specific if you want password or not when running the container:

        docker run -d -p 27017:27017 -p 28017:28017 -e AUTH=no dubc/mongodb-3.4

By default is "yes".


Run MongoDB with a specific storage engine
------------------------------------------

In MongoDB 3.0 there is a new environment variable `STORAGE_ENGINE` to specific the mongod storage driver:

        docker run -d -p 27017:27017 -p 28017:28017 -e AUTH=no -e STORAGE_ENGINE=mmapv1 dubc/mongodb-3.4

By default is "wiredTiger".


Change the default oplog size
-----------------------------

In MongoDB 3.0 the variable `OPLOG_SIZE` can be used to specify the mongod oplog size in megabytes:

        docker run -d -p 27017:27017 -p 28017:28017 -e AUTH=no -e OPLOG_SIZE=50 dubc/mongodb-3.4

By default MongoDB allocates 5% of the available free disk space, but will always allocate at least 1 gigabyte and never more than 50 gigabytes.
<commit_msg>Cleaned up formatting of README.md<commit_after># mongodb-3.4
A docker mongodb version 3.4 with user, password and engine options.

Usage
-----

To create the image `dubc/mongodb-3.4`, execute the following command on the mongodb-3.4 folder:

        docker build -t dubc/mongodb-3.4 .


Running the MongoDB server
--------------------------

Run the following command to start MongoDB:

        docker run -d -p 27017:27017 -p 28017:28017 --name mongodb-3.4 dubc/mongodb-3.4

The first time that you run your container, a new random password will be set.
To get the password, check the logs of the container by running:

        docker logs <CONTAINER_ID>

You will see an output like the following:

        ========================================================================
        You can now connect to this MongoDB server using:

            mongo admin -u admin -p 5elsT6KtjrqV --host <host> --port <port>

        Please remember to change the above password as soon as possible!
        ========================================================================

In this case, `<PASSWORD>` is the password set.
You can then connect to MongoDB:

         mongo admin -u admin -p 5elsT6KtjrqV

Done!


Setting a specific password for the admin account
-------------------------------------------------

If you want to use a preset password instead of a randomly generated one, you can
set the environment variable `MONGODB_PASS` to your specific password when running the container:

        docker run -d -p 27017:27017 -p 28017:28017 -e MONGODB_PASS="<PASSWORD>" --name mongo-3.4 dubc/mongodb-3.4

You can now test your new admin password:

        mongo admin -u admin -p mypass
        curl --user admin:mypass --digest http://localhost:28017/


Setting a specific user:database
--------------------------------

If you want to use another database with another user

    docker run -d -p 27017:27017 -p 28017:28017 -e MONGODB_USER="user" -e MONGODB_DATABASE="mydatabase" -e MONGODB_PASS="<PASSWORD>" --name mongo-3.4 dubc/mongodb

You can now test your new credentials:

    mongo mydatabase -u user -p mypass

Note: with mongo 3.x an admin user is also created with the same credentials

    mongo admin -u user -p mypass

Run MongoDB without password
----------------------------

If you want to run MongoDB without password you can set the environment variable `AUTH` to specific if you want password or not when running the container:

        docker run -d -p 27017:27017 -p 28017:28017 -e AUTH=no dubc/mongodb-3.4

By default is "yes".


Run MongoDB with a specific storage engine
------------------------------------------

In MongoDB 3.0 there is a new environment variable `STORAGE_ENGINE` to specific the mongod storage driver:

        docker run -d -p 27017:27017 -p 28017:28017 -e AUTH=no -e STORAGE_ENGINE=mmapv1 dubc/mongodb-3.4

By default is "wiredTiger".


Change the default oplog size
-----------------------------

In MongoDB 3.0 the variable `OPLOG_SIZE` can be used to specify the mongod oplog size in megabytes:

        docker run -d -p 27017:27017 -p 28017:28017 -e AUTH=no -e OPLOG_SIZE=50 dubc/mongodb-3.4

By default MongoDB allocates 5% of the available free disk space, but will always allocate at least 1 gigabyte and never more than 50 gigabytes.

MongoDB-3.4/history
---------------

Version 3.4. 

Originally this came from the now depreciated tatum/mongodb docker repo. Forked and upgraded to v3.4.
{'fraction_non_alphanumeric': 0.16397966594045024, 'fraction_numerical': 0.04996368917937545, 'mean_word_length': 2.569725246241576, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '693837', 'n_tokens_mistral': 2273, 'n_tokens_neox': 1924, 'n_words': 871}