How to install Aerospike tools in Docker? How to install Aerospike tools in Docker? docker docker

How to install Aerospike tools in Docker?


The Community Edition server containers also has the tools and can be ran through docker exec.

Check docker ps:

docker psCONTAINER ID        IMAGE               COMMAND                CREATED             STATUS              PORTS                              NAMES61fd93be15a3        aerotest            "/entrypoint.sh asd"   21 hours ago        Up 58 seconds       0.0.0.0:3000-3003->3000-3003/tcp   aerospike

Run aql within container:

docker exec -ti aerospike aql --no-config-fileSeed:         127.0.0.1Config File:  NoneAerospike Query ClientVersion 3.15.3.2C Client Version 4.3.5Copyright 2012-2017 Aerospike. All rights reserved.aql> 

Insert a record:

aql> INSERT INTO test.demo (PK, foo, bar) VALUES ('key1', 123, 'abc')OK, 1 record affected.

Query for that record:

aql> select * from test+-----+-------+| foo | bar   |+-----+-------+| 123 | "abc" |+-----+-------+1 row in set (0.140 secs)OK

You can also use the examples in the aerospike github repo:

https://github.com/aerospike/aerospike-tools.docker