2026-01-27 18:32:02 +01:00
# Logos Storage Docker Image
2023-03-08 12:45:55 +01:00
2026-01-27 18:32:02 +01:00
Logos Storage provides pre-built docker images and they are stored in the [logosstorage/logos-storage-nim ](https://hub.docker.com/repository/docker/logosstorage/logos-storage-nim ) repository.
2023-03-08 12:45:55 +01:00
2023-07-04 14:46:49 +03:00
## Run
2023-03-08 12:45:55 +01:00
2026-01-27 18:32:02 +01:00
We can run Logos Storage Docker image using CLI
2023-07-04 14:46:49 +03:00
```shell
# Default run
2026-01-27 18:32:02 +01:00
docker run --rm logosstorage/logos-storage-nim
2023-03-08 12:45:55 +01:00
2023-07-04 14:46:49 +03:00
# Mount local datadir
2026-01-27 18:32:02 +01:00
docker run -v ./datadir:/datadir --rm logosstorage/logos-storage-nim storage --data-dir=/datadir
2023-07-04 14:46:49 +03:00
```
2023-03-20 15:07:07 +01:00
2023-07-04 14:46:49 +03:00
And Docker Compose
```shell
# Run in detached mode
docker-compose up -d
```
2023-06-19 08:28:27 +02:00
2023-03-08 12:45:55 +01:00
2023-07-04 14:46:49 +03:00
## Arguments
2023-03-08 12:45:55 +01:00
2026-01-27 18:32:02 +01:00
Docker image is based on the [storage.Dockerfile ](storage.Dockerfile ) and there is
2023-07-04 14:46:49 +03:00
```
ENTRYPOINT ["/docker-entrypoint.sh"]
2026-01-27 18:32:02 +01:00
CMD ["storage"]
2023-07-04 14:46:49 +03:00
```
2023-06-19 08:28:27 +02:00
2026-01-27 18:32:02 +01:00
It means that at the image run it will just run `storage` application without any arguments and we can pass them as a regular arguments, by overriding command
2023-07-04 14:46:49 +03:00
```shell
2026-01-27 18:32:02 +01:00
docker run logosstorage/logos-storage-nim storage --api-bindaddr=0.0.0.0 --api-port=8080
2023-07-04 14:46:49 +03:00
```
## Environment variables
We can configure Codex using [Environment variables ](../README#environment-variables ) and [docker-compose.yaml ](docker-compose.yaml ) file can be useful as an example.
2023-07-10 16:15:06 +03:00
We also added a temporary environment variable `NAT_IP_AUTO` to the entrypoint which is set as `false` for releases and ` true` for regular builds. That approach is useful for Dist-Tests.
```shell
# Disable NAT_IP_AUTO for regular builds
2026-01-27 18:32:02 +01:00
docker run -e NAT_IP_AUTO=false logosstorage/logos-storage-nim
2023-07-10 16:15:06 +03:00
```
2023-07-04 14:46:49 +03:00
## Slim
2026-01-27 18:32:02 +01:00
1. Build the image using `docker build -t logosstorage/logos-storage-nim:latest -f storage.Dockerfile ..`
2023-07-04 14:46:49 +03:00
2. The docker image can then be minified using [slim ](https://github.com/slimtoolkit/slim ). Install slim on your path and then run:
```shell
slim # brings up interactive prompt
>>> build --target status-im/codexsetup --http-probe-off true
```
3. This should output an image with name `status-im/codexsetup.slim`
4. We can then bring up the image using `docker-compose up -d` .