nim-codex/docker
Ben Bierens d263ca0735
Docker build (#354)
* Sets up working dockerized build and codex docker image creation

* Making codex configurable from the docker environment

* Sets up two networks with three codex nodes

* enables and exposes metrics endpoint for first node

* Manually performed two-client test scenario with docker containers

* Sets up docker-ignore and docker github workflow

* Wires up all codex CLI arguments to docker env vars

* Makes API_PORT variable optional as well

* Removes duplicate docker-login step

* Fixes path to docker file

* Switches target dockerhub for debugging

* Adds git tag info to --version output

* Exposes version information via debug endpoint

* Debugging docker image

* specifies target platforms for docker build

* specifies platform for QEMU and buildx steps

* Attempt to debug line endings

* Disables march-native in config.nims as test

* Applies make argument to disable architecture optimization during docker build

* Removes subset version tags from docker build

* Restore multi-arch build

* Removes docker-build test branch from CI branches
2023-03-08 12:45:55 +01:00
..
prometheus Docker build (#354) 2023-03-08 12:45:55 +01:00
README.md Docker build (#354) 2023-03-08 12:45:55 +01:00
codex.Dockerfile Docker build (#354) 2023-03-08 12:45:55 +01:00
docker-compose.yaml Docker build (#354) 2023-03-08 12:45:55 +01:00
startCodex.sh Docker build (#354) 2023-03-08 12:45:55 +01:00

README.md

Codex Docker Image

Build and run using the example docker-compose file: docker-compose up -d

Stop and retain image and volume data: docker-compose down

Stop and delete image and volume data: docker-compose down --rmi all -v rm -R hostdatadir

Environment variables

Codex docker image supports the following environment variables:

  • LOG_LEVEL
  • METRICS_ADDR
  • METRICS_PORT
  • NAT_IP
  • API_PORT
  • DISC_IP
  • DISC_PORT
  • NET_PRIVKEY
  • BOOTSTRAP_SPR
  • MAX_PEERS
  • AGENT_STRING
  • STORAGE_QUOTA
  • BLOCK_TTL
  • CACHE_SIZE
  • ETH_PROVIDER
  • ETH_ACCOUNT
  • ETH_DEPLOYMENT

All environment variables are optional and will default to Codex's CLI default values.

Constants

Codex CLI arguments 'data-dir', 'listen-addrs', and 'api-bindaddr' cannot be configured. They are set to values required for docker in case of bind addresses. In the case of 'data-dir', the value is set to /datadir. It is important that you map this folder to a host volume in your container configuration. See docker-compose.yaml for examples.

Useful

Connect nodes with the /connect endpoint. To get the IP address of a container within a network: Find container Id: docker ps Open terminal in container: docker exec -it <CONTAINER ID> sh Get IP addresses: ifconfig