Installing Cyberismo
Cyberismo with Docker
Prerequisites
-
The system must have Docker or a similar container environment installed, capable of running Linux-based images.
-
Podman or other rootless container engines might have problems with web server port releases, and if you encounter a 'port is already allocated' error after the first run, you might want to switch to a rootful container engine.
Downloading image from Docker Hub
Latest image can be downloaded with the following command:
$ docker pull cyberismo/cyberismo
Specific versions can be downloaded with the following command:
$ docker pull cyberismo/cyberismo:0.1
Building (If the image is not downloaded from Docker Hub)
Take the following steps:
-
Clone the source repository using one of the following methods:
$ git clone git@github.com:CyberismoCom/cyberismo.git # SSH $ git clone https://github.com/CyberismoCom/cyberismo.git # HTTPS
-
Change to the source directory. If you have already cloned the repository earlier, remember to pull the latest changes:
$ cd cyberismo $ git pull origin main # Optional
-
Execure the following commands:
$ docker build -t cyberismo .
-
Once the build has finished, you can verify the existence of the built image with the following command:
$ docker images
Running
-
It is recommended to execute the following commands only within the Cyberismo root directory or within project directories.
-
To simplify running the image, you can use the following command (works only on Unix-based systems, not in CMD or PowerShell):
Locally built image
$ alias cyberismodocker="docker run --rm -it --user $(id -u):$(id -g) -v .:/project -p 300 0:3000 cyberismo"
Image downloaded from Docker Hub
$ alias cyberismodocker="docker run --rm -it --user $(id -u):$(id -g) -v .:/project -p 300 0:3000 cyberismo/cyberismo"
The alias command allows you to execute the configured Docker environment with a single, simple command.
-
Flags in command:
-
-rm: Removes the container automatically after it exits.
-
-it: Runs the container in interactive mode.
-
--user: Container user will use the same user id as the user executing the command. This will prevent file ownership problems.
-
-v: Maps the current execution directory to the /project directory inside the container, sharing files between host and container.
-
-p: Forwards the port from the container to the host machine, enabling access to the hosted web service.
-
-
Run the following command to view the command-line help:
$ cyberismodocker cyberismo --help
-
If you prefer not to use the alias, you can run the command directly:
$ docker run --rm -it --user $(id -u):$(id -g) -v .:/project -p 3000:3000 cyberismo cyberismo --help
Building and running Cyberismo from source
Prerequisites
-
Install Git. While Cyberismo does not directly depend on Git, you will need it to manage Cyberismo content, such as when installing Cyberismo modules.
-
Install Clingo. The currently supported Clingo version is 5.7.1. We recommend installing a Python-enabled build using Anaconda, as instructed in https://github.com/potassco/clingo/releases/.
-
Install Node.js. The currently supported Node.js version is the latest LTS, v20.10.0. Node.js is downloadable from https://nodejs.org/.
Building
Take the following steps:
-
Clone the source repository using one of the following methods:
$ git clone git@github.com:CyberismoCom/cyberismo.git # SSH $ git clone https://github.com/CyberismoCom/cyberismo.git # HTTPS
-
Change to the source directory. If you have already cloned the repository earlier, remember to pull the latest changes:
$ cd cyberismo $ git pull origin main # Optional
-
Execute the following commands:
$ pnpm setup $ pnpm install $ pnpm build $ pnpm link -g