Tags: explanation, developer, how-to

Development and debugging rules, tips and tricks#

Note

This page has been migrated from the old documentation, and has not yet been fully revised. There might be inconsistencies or errors when using with current LinkAhead versions.

Connecting to containers and services#

  • Start a shell inside the LinkAhead container: docker exec -ti linkahead /bin/bash

    • As root: docker exec --user 0:0 -ti linkahead /bin/bash

  • Connect to the SQL database (from inside the caosdb-server container): mariadb -h sqldb -u caosdb -prandom1234 caosdb

    • If you want to transfer 4-byte characters (e.g. Chinese or emojis), add the option --default-character-set=utf8mb4

    • A combined command: docker exec -ti linkahead mariadb -h sqldb -u caosdb -prandom1234 caosdb

Setting up a Debian caching proxy for apt#

A proxy which caches access to the apt repositories can speed up Docker building a lot, especially on slow an/or unreliable internet connections.

LinkAhead by default looks for an HTTP proxy server running on the Docker host which listens on port 8123.

Developer’s note: We chose port 8123 in order to keep the default port 8000 free for other applications which use it by default.

Squid#

An easy way to set up a server is to use Squid, especially with the default settings as packaged on Debian and Ubuntu in the squid-deb-proxy package: apt install squid-deb-proxy

After installation, edit /etc/squid-deb-proxy/squid-deb-proxy.conf and change the port to 8123.

If you are paranoid, you may restrict the allowed networks to 172.17.0.0/24 in /etc/squid-deb-proxy/allowed-networks-src.acl.