https://docs.docker.com/desktop/setup/install/mac-install/
해당하는 os에 맞게 dmg 파일 설치
docker
# 결과
Usage: docker [OPTIONS] COMMAND
A self-sufficient runtime for containers
Common Commands:
run Create and run a new container from an image
exec Execute a command in a running container
ps List containers
build Build an image from a Dockerfile
pull Download an image from a registry
push Upload an image to a registry
images List images
login Authenticate to a registry
logout Log out from a registry
search Search Docker Hub for images
version Show the Docker version information
info Display system-wide information
...
docker --version
# 결과
Docker version 27.4.0, build bde2b89
docker pull redis
# 결과
.
.
.
Status: Downloaded newer image for redis:latest
docker.io/library/redis:latest
docker images
docker run --name ylog-redis -p 6379:6379 -d redis
-> docker run --name [원하는 컨테이너명] -p [포트]:[포트] -d redis
docker ps
-> 현재 작동 중인 컨테이너 리스트 출력
docker exec -it ylog-redis /bin/bash
root@f3537a492dc9:/data#
redis-cli
127.0.0.1:6379>
💡 참고
https://velog.io/@coastby/redis-docker%EB%A1%9C-redis-%EB%9D%84%EC%9A%B0%EA%B8%B0