Much earlier in this course like in the first one or two sections you saw me start up a new copy of
red on my computer by using Docker as a reminder.
Reddest is an in-memory data store that is very commonly used with web applications.
You saw me start up a red it's instance using Docker and it seemed to be really easy and very straightforward
but I'm going to show you kind of an oddity around using red is with Docker.
Very quickly I took the liberty of installing red reds on my local machine directly without Docker being
involved whatsoever because I want to show you the normal way in which we might interact with reds.
I'm going to first start up an instance of the red a server by running red a server.
Now again I am able to run this command because I installed red is on my local machine without Docker
involved.
Chances are you do not have red is installed on your computer.
So don't try to run this command because it's probably going to result in an error.
Now when I run that command you're gonna see that yep I get an instance of the red a server running
it's in memory it's ready to store data or do whatever I need it to do that one the very common ways
in which we can kind of poke into this thing or into the server and inspect the data that is inside
of it is by using a second program called the red is CLIA.
So on my computer I've already got red a server running I'm going to now start up a second program called
Red is CLIA and again the entire purpose of the thing is to kind of reach into that server and poke
around inside of it.
So I'm going to open up a second terminal window and I'll run red is CLIA.
And that gives me a little prompt right here that allows me to issue commands directly to the running
red a server.
And so I can do something like store my number or not store but set my number is five and then I can
then retrieve that value and it prints out five.
So this right here is the normal interaction that you would see with red s with red CLIA.
Clearly it's really nice to be able to run the red AC lie and interact directly with information inside
that running red a server.
All right.
So now you're probably wondering where am I going with this.
Well let's try starting up red is using Docker and then you're going to very quickly see some interesting
behavior around Red as Seelye.
So let's give it a shot.
I'm going to stop my running stuff and then I'm going to start up an instance of red is on my machine
using Docker run red it's now it's going to start up just about instantly for me.
For you it might take a second or two as it has to download the image but overall it should be pretty
darn quick when you start up red as you might see a couple of warnings.
Those are truly fine.
You can ignore them.
Just make sure that the very last line that you see is something it says ready to accept connections.
So as long as you see that you're good to go.
All right.
So this right here.
Well we are running right here is the red is server.
So I now want to start up a copy of the red a Seelye and tried to work with the information that is
being handled inside of the server.
As you saw just a moment ago I was able to open up a second console window and run red to see a light.
So maybe four dark or being involved here maybe we just have to run like red Acela here.
Oh no that clearly doesn't do anything.
Maybe we need to start up a second terminal window and tried running right Acela there.
Let's try that.
We'll open up a second window and then run red a a.
Now chances are you're going to see a message that says something like command not recognize or command
not found.
I see something and says could not connect to read us.
So what's going on here.
Well let's look at a diagram so just a second ago we started up a new container that is running red
as server now red is is running only inside this container.
So if I tried to run red this Seelye outside the container outside the container I have no access to
anything that's going on inside there.
And so there is no red Acela command to run outside the container.
If we want to start up the ally we need to somehow get in to this container and execute a second command
inside of it like this.
We need to start up a second program inside the container so to figure out how to do so let's take a
quick break.
We'll come back the next section and figure out how we can execute a second command inside of a running
container.
So see you in just a minute.