Update README to match the one in Docker Hub

pull/2/head
Mickael Remond 8 years ago
parent fba815753d
commit 20fdfae3a2
No known key found for this signature in database
GPG Key ID: E6F6045D79965AA3

@ -1,23 +1,19 @@
# ejabberd image for developers ## Docker image for ejabberd developers
Thanks to this image, you can build ejabberd with dependencies provided in Thanks to this image, you can build ejabberd with dependencies provided in Docker image, without the need to install build software (despite Docker) directly on your own machine.
Docker image, without the need to install build software
(despite Docker) directly on your own machine.
Please note that this image can likely be reused as is to build other Erlang or Please note that this image can likely be reused as is to build other Erlang or Elixir software.
Elixir software.
## Building ejabberd from source ### Building ejabberd from source
You can build ejabberd from source with all dependencies, with the following You can build ejabberd from source with all dependencies, with the following commands:
commands:
```bash ```bash
git clone https://github.com/processone/ejabberd.git git clone https://github.com/processone/ejabberd.git
docker run --rm -v $(pwd):$(pwd) -w $(pwd) ejabberd/mix do deps.get, deps.compile, compile docker run --rm -v $(pwd):$(pwd) -w $(pwd) ejabberd/mix do deps.get, deps.compile, compile
``` ```
# Run ejabberd with mix command-line tool attached ## Run ejabberd with mix command-line tool attached
```bash ```bash
docker run --rm -it -p 5222:5222 -p 5280:5280 -v $(pwd):$(pwd) -w $(pwd) --entrypoint="/usr/bin/iex" ejabberd/mix -S mix docker run --rm -it -p 5222:5222 -p 5280:5280 -v $(pwd):$(pwd) -w $(pwd) --entrypoint="/usr/bin/iex" ejabberd/mix -S mix
@ -25,32 +21,27 @@ docker run --rm -it -p 5222:5222 -p 5280:5280 -v $(pwd):$(pwd) -w $(pwd) --entry
You can then create a user from Elixir and connect with an XMPP client. You can then create a user from Elixir and connect with an XMPP client.
# Get into the container ## Get into the container
If you want to run Erlang command line, you can do so by opening a shell inside If you want to run Erlang command line, you can do so by opening a shell inside the container:
the container:
```bash ```bash
docker run -it -v $(pwd):$(pwd) -w $(pwd) --entrypoint="/bin/sh" ejabberd/mix docker run -it -v $(pwd):$(pwd) -w $(pwd) --entrypoint="/bin/sh" ejabberd/mix
``` ```
# Build the image ## Build the image
Building the image is not needed if you simply want to use it. You can simply Building the image is not needed if you simply want to use it. You can simply use the one from [ejabberd Docker Hub](https://hub.docker.com/u/ejabberd/dashboard/).
use the one from [ejabberd Docker
Hub](https://hub.docker.com/u/ejabberd/dashboard/).
```bash ```bash
docker build -t ejabberd/mix . docker build -t ejabberd/mix .
``` ```
# Troubleshooting ## Troubleshooting
## Clock resync ### Clock resync
If you have warning about file timestamp being out of sync (Like 'Clock skew detected'), If you have warning about file timestamp being out of sync (Like 'Clock skew detected'), you may want to force resync your clock before running the build. Docker on MacOS does not force clock resync of Docker after the laptop went to sleep.
you may want to force resync your clock before running the build. Docker on
MacOS does not force clock resync of Docker after the laptop went to sleep.
You can force clock resync as follow: You can force clock resync as follow:
@ -58,8 +49,7 @@ You can force clock resync as follow:
docker run -it --rm --privileged --entrypoint="/sbin/hwclock" ejabberd/mix -s docker run -it --rm --privileged --entrypoint="/sbin/hwclock" ejabberd/mix -s
``` ```
You can check if the clock of your laptop is in sync with the one inside Docker You can check if the clock of your laptop is in sync with the one inside Docker with the following command:
with the following command:
```bash ```bash
docker run --rm --entrypoint="/bin/sh" ejabberd/mix -c date -u && date -u docker run --rm --entrypoint="/bin/sh" ejabberd/mix -c date -u && date -u

Loading…
Cancel
Save