Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eclipse-mosquitto: Update license and improve documentation #2498

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

ralight
Copy link
Contributor

@ralight ralight commented Oct 21, 2024

No description provided.

Copy link
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few comments -- notably, $(pwd) shells out unnecessarily: the shell maintains $PWD automatically 😄


```console
$ docker run -it -p 1883:1883 -p 9001:9001 -v mosquitto.conf:/mosquitto/config/mosquitto.conf %%IMAGE%%
$ docker run -it -p 1883:1883 -v $(pwd)/mosquitto/config:/mosquitto/config %%IMAGE%%
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ docker run -it -p 1883:1883 -v $(pwd)/mosquitto/config:/mosquitto/config %%IMAGE%%
$ docker run -it -p 1883:1883 -v "$PWD/mosquitto/config:/mosquitto/config" %%IMAGE%%

@@ -40,7 +46,19 @@ i.e. add the following to `mosquitto.conf`:
Run a container using the new image:

```console
$ docker run -it -p 1883:1883 -p 9001:9001 -v mosquitto.conf:/mosquitto/config/mosquitto.conf -v /mosquitto/data -v /mosquitto/log %%IMAGE%%
$ docker run -it -p 1883:1883 -v $(pwd)/mosquitto/config:/mosquitto/config -v /mosquitto/data -v /mosquitto/log %%IMAGE%%
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ docker run -it -p 1883:1883 -v $(pwd)/mosquitto/config:/mosquitto/config -v /mosquitto/data -v /mosquitto/log %%IMAGE%%
$ docker run -it -p 1883:1883 -v "$PWD/mosquitto/config:/mosquitto/config" -v /mosquitto/data -v /mosquitto/log %%IMAGE%%

or:

```console
$ docker run -it -p 1883:1883 -v $(pwd)/mosquitto/config:/mosquitto/config -v $(pwd)/mosquitto/data:/mosquitto/data -v $(pwd)/mosquitto/log:/mosquitto/log %%IMAGE%%
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ docker run -it -p 1883:1883 -v $(pwd)/mosquitto/config:/mosquitto/config -v $(pwd)/mosquitto/data:/mosquitto/data -v $(pwd)/mosquitto/log:/mosquitto/log %%IMAGE%%
$ docker run -it -p 1883:1883 -v "$PWD/mosquitto/config:/mosquitto/config" -v "$PWD/mosquitto/data:/mosquitto/data" -v "$PWD/mosquitto/log:/mosquitto/log" %%IMAGE%%

## Configuration

When running the image, the default configuration values are used. To use a custom configuration file, mount a **local** configuration file to `/mosquitto/config/mosquitto.conf`
When running the image, the default configuration values are used. To use a custom configuration file, create your mosquitto.conf in `$(pwd)/mosquitto/config/mosquitto.conf`, then mount the config directory to `/mosquitto/config`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When running the image, the default configuration values are used. To use a custom configuration file, create your mosquitto.conf in `$(pwd)/mosquitto/config/mosquitto.conf`, then mount the config directory to `/mosquitto/config`.
When running the image, the default configuration values are used. To use a custom configuration file, create your mosquitto.conf in `$PWD/mosquitto/config/mosquitto.conf`, then mount the config directory to `/mosquitto/config`.

For example, if you use port 1883 and port 8080:

```console
$ docker run -it -p 1883:1883 -p 8080:8080 -v $(pwd)/mosquitto/config:/mosquitto/config %%IMAGE%%
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ docker run -it -p 1883:1883 -p 8080:8080 -v $(pwd)/mosquitto/config:/mosquitto/config %%IMAGE%%
$ docker run -it -p 1883:1883 -p 8080:8080 -v "$PWD/mosquitto/config:/mosquitto/config" %%IMAGE%%

@ralight
Copy link
Contributor Author

ralight commented Oct 22, 2024

I left a few comments -- notably, $(pwd) shells out unnecessarily: the shell maintains $PWD automatically 😄

Thanks, that's bad habit of mine :)

@tianon tianon merged commit 9206594 into docker-library:master Oct 22, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants