Additional information#
This section provides the following additional information:
Docker commands#
Show containers#
To show the list of launched Docker containers use the command:
docker ps
To show all the existing Docker containers use the command:
docker ps -a
Copy files to container#
You can transfer files into the container. Use the docker cp command to copy a file into the container.
docker cp <file_location> <container_name>:<folder_inside_container>
Enter container#
You can enter individual containers using the following command:
docker exec -it <container_name> bash
To exit the container, use the command:
exit
Images names#
You can see all the names of the images using the command:
docker images
Delete image#
If you need to delete an image:
- Run the
docker imagescommand. - Find the required image, for example dockerhub.visionlabs.ru/luna/luna-image-store.
- Copy the corresponding image ID from the IMAGE ID, for example, "61860d036d8c".
- Specify it in the deletion command:
docker rmi -f 61860d036d8c
Delete all the existing images.
docker rmi -f $(docker images -q)
Stop container#
You can stop the container using the command:
docker stop <container_name>
Stop all the containers:
docker stop $(docker ps -a -q)
Delete container#
If you need to delete a container:
- Run the "docker ps" command.
- Stop the container (see Stop container).
- Find the required image, for example dockerhub.visionlabs.ru/luna/luna-image-store.
- Copy the corresponding container ID from the CONTAINER ID column, for example, "23f555be8f3a".
- Specify it in the deletion command:
docker container rm -f 23f555be8f3a
Delete all the containers.
docker container rm -f $(docker container ls -aq)
Check service logs#
You can use the following command to show logs for the service:
docker logs <container_name>
Logging to server#
To enable saving logs to the server, you should:
- Create directories for logs on the server.
- Activate log recording and set the location of log storage inside LP service containers.
- Configure synchronization of log directories in the container with logs on the server using the
volumeargument at the start of each container.
Docker Compose script is already configured to synchronize directories with the folders created in the section below.
Create logs directory#
You need to create the following directories for storing logs and assign them the appropriate rights.
mkdir -p /tmp/logs/luna-vector-search-module /tmp/logs/python-matcher-proxy
chown -R 1001:0 /tmp/logs/luna-vector-search-module /tmp/logs/python-matcher-proxy
Logging activation#
To enable logging to file, you need to set the log_to_file and folder_with_logs settings in the LUNA_VECTOR_SEARCH_MODULE_LOGGER section of LVSM settings.
Automatic method
To update logging settings, you can use the logging.json settings file provided with the distribution package.
Update your logging settings using Storages utility:
docker run \
--rm \
--network=host \
-v /var/lib/luna/lvsm-current/example-docker/configs/logging.json:/srv/logging.json \
dockerhub.visionlabs.ru/luna/storages:v.0.90.0 \
bash -c "luna_prepare load_dump \
--dump-file=/srv/logging.json"
Manual method
Go to the Configurator service interface (127.0.0.1:5070) and set the logs path in the container in the folder_with_logs parameter for all services whose logs need to be saved. For example, you can use the path /srv/logs.
Set the log_to_file option to true to enable logging to file.