Running Redis in Docker in OSX

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey how's it going justin castillo here with redis university just wanted to show you really quickly how to connect to redis via docker super super simple all right join me [Music] with me justin cassidy all right so we're gonna start with docker so i have docker version uh 20.10.2 and i'm going to just start so docker run i'm going to call dash p6379 colons 6379 now this is going to map the internal redis servers 6379 port to the external access so i can actually contact this database outside the docker container dash d is going to run the redis server in the background so that i'll just have an open command prompt after this which is really really nice and then i'm going to give my redis instance a name so i'm going to call it redis 6 because i know i'm going to be downloading the latest version the next is going to be redis colon latest and this is just telling docker that i want the latest version of redis i could change this to you know 5.0 by 0.11 or 6.0.1 whatever i want and they'll give me previous versions but i want the latest all right should be good to go it's not going to find the image locally so it's going to pull it from docker hub it's going to install it and there we go so now you see i have this long hash that's my container id so docker ps there you go there's my container id and there's all the information i gave it i wanted the redis colon latest version and the name is reda6 and my ports are mapped to 6379 on the outside all right so i have two different options on how to actually access this and check to make sure it works via the command line redis command line i could do internally with docker docker exec dash i t the name and sh and so i'm opening a shell and i'll call redis cli cool so now i'm internally inside i'm internally inside i am inside the container and i can do all of my work so let me just call info server and this allows me to check my version redis point 6.2 versus our redis 621 good to go and so that is one way as i'm still in the shell exit again now i can also uh i already have redis installed locally on machine on my machine so i can call redis cli and this will automatically check for 6379 connection so here you go so now i'm actually connected to my redis instance in my docker container cool so let's do the same thing and let's do it um for redis mod now redis mod is a redis labs offering that has all of our i'm sorry a lot of different modules installed for you to work with so let me stop my image three eight five d c d four f a b seven no such container all right let's just copy pasta okay so it's turned off and so now i'm going to call docker run same pattern dash p 6379 colon 6379 dash d the name i'll call it redis mod do that and then i'm going to call redis labs slash redis mod it's unable to find it locally and now it will pull it from docker hub now this is quite a bit larger because it has so many different modules installed so don't be surprised if this takes a little bit longer to run or i'm sorry install before you get up and running a few moments later okay cool so now everything is running and now i have my new um hash so let me just run docker ps just to be on the safe side there we go you'll see i'm running redis mod um and there's my name redis mod and that is properly published from 6379-6379 so i'll just use my local redis cli instance now let me call info server and i see that it's running redis version 601 and then let me call reddit or sorry info modules and this will give me all the modules that i have installed on this instance so we have redis time series redis json redis ai redis search redis graph redis bloom filter and redis gears so this is everything you need to get up and running and and very powerful uh with with redis and the redis modules cool so hopefully that was helpful if you have any questions please don't hesitate to leave a comment in the comment section or contact us via our discord server for redis i would love to have a chat with you and see what you'd like to see all right have a great day [Music] you
Info
Channel: Redis
Views: 4,548
Rating: undefined out of 5
Keywords:
Id: -lQVFP5HFAM
Channel Id: undefined
Length: 5min 44sec (344 seconds)
Published: Sat Aug 28 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.