Skip to content

Commit

Permalink
Merge pull request #4030 from esl/docker-script
Browse files Browse the repository at this point in the history
Adding information about the docker building script to the documentation
  • Loading branch information
chrzaszcz authored May 30, 2023
2 parents 3eff59b + 573b8ca commit 2f1710a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
33 changes: 33 additions & 0 deletions doc/tutorials/Docker-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# How to build and run MongooseIM docker image

The instruction below will guide you through the process of building and running the MongooseIM docker image.

## Requirements

To follow this guide you need to have [docker](https://www.docker.com/) installed and the MongooseIM GitHub repository cloned locally.

## Building docker image

To build a MongooseIM image, navigate to the main repo directory (referenced as `$REPO` in this guide) and execute:

```bash
./tools/build-docker-from-remote.sh
```

which will build a MongooseIM docker image based on the current local commit if it is available on the remote.

Alternatively, it is possible to build a docker image based on any commit available on remote (commit hash referenced as `$COMMIT_HASH`), by executing:

```bash
./tools/build-docker-from-remote.sh $COMMIT_HASH
```

## Running docker image

Full tutorial on running a docker image is available on [mongooseim-docker](https://github.com/esl/mongooseim-docker) GitHub. Here only simple and one-node configuration will be presented. In order to run it execute:

```bash
docker run -dt -h first-node --name first-node -e JOIN_CLUSTER=false mongooseim
```

which starts a single MongooseIM node named `first-node`.
8 changes: 4 additions & 4 deletions doc/tutorials/How-to-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Instructions provided in this page are verified for:
* CentOS 7
* Ubuntu 16.04 LTS (Xenial)
* Ubuntu 18.04 LTS (Bionic)
* macOS 10.14 (Mojave)
* macOS 13.3 (Ventura)

For any other OS versions, the instructions should still work, however, some steps or file paths may be different.

Expand All @@ -17,7 +17,7 @@ To compile MongooseIM you need:

* Make: `make`,
* C and C++ compiler: `gcc`, `gcc-c++`,
* Erlang/OTP 23.3 or higher:
* Erlang/OTP 24.0 or higher:
* `erlang` package, or,
* `esl-erlang` from [Erlang Solutions website](https://www.erlang-solutions.com/resources/download.html), or,
* install using [kerl](https://github.com/kerl/kerl),
Expand All @@ -29,7 +29,7 @@ To compile MongooseIM you need:

* Make: `make`,
* C and C++ compiler: `gcc`, `g++`,
* Erlang/OTP 23.3 or higher:
* Erlang/OTP 24.0 or higher:
* `erlang` package, or,
* `esl-erlang` from [Erlang Solutions website](https://www.erlang-solutions.com/resources/download.html), or,
* install using [kerl](https://github.com/kerl/kerl),
Expand All @@ -40,7 +40,7 @@ To compile MongooseIM you need:
=== "macOS"

* Make, C and C++ compiler: Xcode Command Line Tools,
* Erlang/OTP 23.3 or higher:
* Erlang/OTP 24.0 or higher:
* [`erlang`](https://formulae.brew.sh/formula/erlang) from Homebrew,
* install using [kerl](https://github.com/kerl/kerl),
* OpenSSL 0.9.8 or higher, for STARTTLS, SASL and SSL encryption: [`openssl`](https://formulae.brew.sh/formula/[email protected]) from Homebrew
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ nav:
- 'High-level Architecture': 'user-guide/High-level-Architecture.md'
- Tutorials:
- 'How to Build MongooseIM from source code': 'tutorials/How-to-build.md'
- 'How to build and run MongooseIM docker image': 'tutorials/Docker-build.md'
- 'How to Set up Push Notifications': 'tutorials/push-notifications/Push-notifications.md'
- 'How to Set up Push Notifications on the client side': 'tutorials/push-notifications/Push-notifications-client-side.md'
- 'How to Set up MongoosePush': 'tutorials/push-notifications/MongoosePush-setup.md'
Expand Down

0 comments on commit 2f1710a

Please sign in to comment.