Comments (2)
You want to use docker exec
not docker run
to run keydb-cli
inside your running container.
$ docker run --rm --name mycontainername -p 6381:6379 -d eqalpha/keydb
10cdd9cc34d672c75b39c094924e1f3c889b25973696d6b55ab8452daeddbae3
$ docker run --rm --name mycontainername1 -p 6379:6379 -d eqalpha/keydb
0c236966c2daade388e21380dc3e34f49795d1d3779c3e9f48a3edf8b6923a18
Running instances:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0c236966c2da eqalpha/keydb "docker-entrypoint.s…" 2 minutes ago Up 2 minutes 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp mycontainername1
10cdd9cc34d6 eqalpha/keydb "docker-entrypoint.s…" 2 minutes ago Up 2 minutes 0.0.0.0:6381->6379/tcp, :::6381->6379/tcp mycontainername
And connecting to them:
$ keydb-cli -p 6381 info|grep run_id
run_id:f9a30f414e526625622a94de5fd6500c4b3d10b9
$ docker exec -it mycontainername keydb-cli info|grep run_id
run_id:f9a30f414e526625622a94de5fd6500c4b3d10b9
$ keydb-cli -p 6379 info|grep run_id
run_id:dc9d0470fe9302c7891a188aa7a73c45a3d002c6
$ docker exec -it mycontainername1 keydb-cli info|grep run_id
run_id:dc9d0470fe9302c7891a188aa7a73c45a3d002c6
from keydb.
I see. It's true that I don't fully understand docker yet , docker run eqalpha/keydb keydb-cli
connects to port 6379 inside the container, or i can connect directly without specifying a port,
[root@10-7-154-170 ~]# docker run -it --rm eqalpha/keydb keydb-cli -h 172.17.0.2 -a mypassword
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
Message of the day:
KeyDB has now joined Snap! See the announcement at: https://docs.keydb.dev/news
172.17.0.2:6379> set port 6381
OK
[root@10-7-154-170 ~]# keydb-cli -p 6381 -a mypassword
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
Message of the day:
KeyDB has now joined Snap! See the announcement at: https://docs.keydb.dev/news
127.0.0.1:6381> get port
"6381"
from keydb.
Related Issues (20)
- [CRASH] BGSave crashes HOT 3
- Keydb server not accepting connections after a few hours HOT 13
- Flash multi exec on hard restart/crash
- [BUG] keydb-tools installation on debian 12 bookworm via ppa fails due to libssl1.1 dependency HOT 1
- Installing keydb into an Ubuntu Docker image fails because the postinstall script assumes systemd
- The repository 'https://download.keydb.dev/open-source-dist noble Release' does not have a Release file. HOT 3
- [Help] Migration from cluster redis to keydb cluster HOT 2
- [HELP] active-replica READONLY You can't write against a read only replica HOT 1
- is this project still actively maintained? HOT 7
- [HELP] Does keydb s3 backup require already existing file in S3 bucket?
- [CRASH] [ARM] <jemalloc>: Unsupported system page size
- MultiMaster Mode and Dns Resolve
- [BUG] Incorrect memory usage in multi-master mode
- Software freezing when Pub/Sub Worker fails many times.
- [NEW] Specify which keys should go directly to flash
- [CRASH] when trying to install redisgraph HOT 1
- Client name not visible in logs?
- [CRASH] The replicas are crashing after the master is restarted with replicas and multi-master enabled
- [NEW] MALLOC env variabile ignored
- client side caching
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keydb.