$ docker pull fishgoddess/postar:v0.1.2-alpha
Before running this image, you should prepare a config file named "postar.ini", and put it to where you execute this command.
A typical config file will be like this:
[smtp] host = smtp.your-smtp-host.com port = 587 username = firstname.lastname@example.org password = your-smtp-password
You should replace the information of yours.
Then, it's ok! Try to run by this command, and you will see a welcome interface:
$ docker run --name postar -p 5779:5779 -v /root/postar/postar.ini:/opt/postar-v0.1.2-alpha/postar.ini -d fishgoddess/postar:v0.1.2-alpha
Remember "/root/postar/postar.ini" is where your config file is.
The work directory is "/opt/postar-v0.1.2-alpha/".
If you want to enter the container, try this:
$ docker exec -it postar sh
Notice that the based image we used is alpine, which doesn't have bash.
So, you should use sh instead of bash.
First, you should prepare a file named "docker-compose.yaml".
A typical docker-compose file will be like this:
version: "3.1" services: postar: image: fishgoddess/postar:v0.1.2-alpha ports: - "5779:5779" # - "5780:5780" volumes: - ./logs:/opt/postar-v0.1.2-alpha/logs - ./logs/error:/opt/postar-v0.1.2-alpha/logs/error - ./postar.ini:/opt/postar-v0.1.2-alpha/postar.ini
Notice that we map directory "logs" in the container to local directory "logs".
So, you can read these logs conveniently.
Then, you can execute docker-compose command to run it:
$ docker-compose up -d