Tuesday, August 29, 2023

Creating Docker Images and Dockerfile

 Docker architecture


Dockerfile

Create a directory called redi-image

mkdir redis-image
cd redis-image

Create a Docker file "Dockerfile" inside the redis-image directory. The Dockerfile has below content


From the base image
Run the update on redis
Command

Next build the image using the following docker command

docker build .


Now run the docker run command

docker run 2cad9caf152f



Redis server is up and ready to accept connections

Open a new terminal and run docker ps


Connect to redis-cli using the redis-server container and run commands