This is a Dockerfile to be able to build an image of PtokaX 0.5.3.0 (20th anniversary edition) and to create a container of the image. This README has a tutorial to start with a custom configuration for PtokaX made by me, you have several options to start with this image:
- You can follow my tutorial to have a solid base to start and later change the settings with your own values.
- You can inject your current config if you have it to the new version of PtokaX.
- If you prefer you can start without config and let PtokaX create it for you.
- Docker
- There's a default user created to be able to operate with the hub: User -> main | Password -> main123, when not needed anymore because we've created at least one master user, we can delete it with a chat command.
- PtokaX logs are stored on logs directory, this will be bound when creating the container and this gave us the possibility to watch logs from the host machine.
- All PtokaX configuration are under config directory, this will be bound when creating the container, this give us some advantages:
- We have the settings available to watch and change from the host machine.
- We don't lose settings when container is deleted/re-created.
- Settings has been prepared to host a private PtokaX Direct Connect Hub, if we want to make it public, we have to change the
Settings.pxt
file.
- If we want to change any setting from the
.pxt
,.pxb
files, we must stop the container first. Because all manually changed settings or using PtokaX CLI tool, when container and PtokaX main process is running are not applied on the fly and the most important, when PtokaX service or container stops the changes are overriden with the in memory values of the main process of PtokaX.
Clone the repo using git with https
git clone https://github.com/ruben69695/ptokax-dockerfile.git
- Build image from dockerfile
docker build -t ptokax:latest .
- Create the container based on the image.
Be sure to replace the src param with your host path to the cloned repository on your machine
docker create --name ptokax \
-p 54400:411 \
--mount type=bind,src=/home/rubenarrebola/Development/ptokax/config,target=/src/cfg \
--mount type=bind,src=/home/rubenarrebola/Development/ptokax/logs,target=/src/logs \
ptokax:latest
- Start the created container
docker start ptokax
- If we have to connect to the container shell, we can do it like this
docker exec -it ptokax bash
- Default user: main
- Default pass: main123
- In the hub chat, we can see a list of available commands for our user sending the message (command) !help
!help
-
Before create a new user we have to understand the available profiles for the user, this declares what the user can do in the hub. The available profiles are:
master | operator | vip | reg
-
In the hub chat, with our main user (profile: master), we can create users directly from the chat. As we saw the !help command displays a list of commands, and the command to create new users is the next one: !addreguser. So if we want to give access to a friend, we can create a new user for him/her in the hub. Example:
!addreguser <nick> <password> <profilename>
!addreguser ruben ruben123 reg
The image is also available directly in the next container registries and ready to go.
- Fedora 37
- Codium 1.74