-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
07929de
commit 28b18e5
Showing
1 changed file
with
12 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
# Usage of Kolibri2zim using Docker | ||
# Usage of Kolibri2zim | ||
Docker | ||
------ | ||
|
||
- Clone the kolibri2zim repository from here to your local machine | ||
- Clone the kolibri2zim repository to your local machine | ||
|
||
- cd into its new_ui branch | ||
|
||
- run the following command with the channel id and name of the channel you are converting to to .zim | ||
- run the following command with the channel id and `name-of-the-zim` you are converting to to .zim, `channel-id` is a 32-characters long ID that you can find in the URL of the channel you want, either from [Kolibri Studio](https://studio.learningequality.org) or the [Kolibri Catalog](https://kolibri-catalog-en.learningequality.org) | ||
|
||
```bash | ||
docker run -v my_dir:/output ghcr.io/openzim/kolibri kolibri2zim --channel-id `channel-id` --name `name-of-the-channel` | ||
``` | ||
|
||
- This will create a `.zim` file in the `/output` file in the docker container. | ||
- This will create a `.zim` file in the `/output` file, which will be persisted in the my_dir Docker volume. | ||
|
||
-For getting this .zim file on to your local machine you can save it to your desktop by using `save` option from docker. | ||
-For getting this .zim file on to your local machine you can save it to your desktop by using `save` command(right click on mouse). | ||
|
||
- For rendering this `.zim` file, you need to setup [kiwix-server](https://kiwix.org/en/applications/). | ||
- For opening this `.zim` file, you need a ZIM reader,you could use a Kiwix one and you might use [kiwix-serve](https://kiwix.org/en/applications/). | ||
|
||
- now you can access that created `.zim` file from the `kiwix-server ui` and start the server on the localhost. | ||
- now you can access that created `.zim` file from the `kiwix-serve ui` and start the server on the localhost. | ||
|
||
- Whenever you make changes in the code during devepment, you need to create a docker image of your modified code using | ||
- Whenever you make code changes during development, you need to create a Docker image of your modified code using | ||
|
||
```bash | ||
docker build -t `your-image-name`:`version` . | ||
``` | ||
- Here, "your-image-name" would be replaced with the name you choose for your Docker image, and "version" would be replaced with a version tag, like "latest," "v1.0," etc. this image is for local use only, and thus doesn't need to follow any standardized naming or versioning conventions. | ||
|
||
- You need to run that image going into the `images` section in docker. | ||
|
||
- Then run this command to create the `.zim` file using your modified code, run- | ||
|
||
```bash | ||
docker run -v my_dir:/output `your-image-name` kolibri2zim --channel-id `channel-id` --name `name-of-the-channel` | ||
docker run -v my_dir:/output `your-image-name:version` kolibri2zim --channel-id `channel-id` --name `name-of-the-zim` | ||
``` |