Community maintained Docker config for the knot server forked from psychedeli.ca/knot-docker
Files
readme.md
# Knot Docker > **IMPORTANT** > This is a community maintained repository, support is not guaranteed. Docker container and compose setup to run a [Tangled](https://tangled.org) knot and host your own repository data. ## Pre-built Images There is a [repository](https://atcr.io/r/tangled.org/knot) of pre-built images for tags starting at `v1.13.0-alpha` if you prefer. ``` docker pull atcr.io/tangled.org/knot:latest ``` Note that these are *not* official images, you use them at your own risk. `:latest` still refers to the Go knot, and knot 2 is `:2`, built from `Dockerfile.knot2`. Swapping the tag alone won't migrate anything, so read [Migrating To Knot 2](#migrating-to-knot-2) before you touch the image line. ## Building The Image By default the `Dockerfile` will build the latest tag, but you can change it with the `TAG` build argument. ```sh docker build -t knot:latest --build-arg TAG=master . ``` The command above for example will build the latest commit on the `master` branch. By default it will also create a `git` user with user and group ID 1000:1000, but you can change it with the `UID` and `GID` build arguments. ```sh docker build -t knot:latest --build-arg UID=$(id -u) GID=$(id -g) ``` The command above for example will create a user with the host user's UID and GID. This is useful if you are bind mounting the repositories and app folder on the host, as in the provided `docker-compose.yml` file. <hr style="margin-bottom: 20px; margin-top: 10px" /> When using compose, these can be specified as build arguments which will be passed to the builder. ```yaml build: context: . args: TAG: master UID: 1000 GID: 1000 ``` This will for example tell docker to build it using the `master` branch like the command. ## Migrating To Knot 2 Knot 2 is a second implementation of the knot, published as `atcr.io/tangled.org/knot:2`. Your knot can stay where it is until you edit the image line yourself. There's no main tangled-proper release tag for knot 2 yet, thus `Dockerfile.knot2` will build…