docker redis

$ docker pull redis -d는 컨테이너를 백그라운드로 실행하라는 것 $ docker run --name myredis -d redis $ docker logs 809b11ac4b561:C 09 Jul 03:10:54.232 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo1:C 09 Jul 03:10:54.232 # Redis version=4.0.10, bits=64, commit=00000000, modified=0, pid=1, just started1:C 09 Jul 03:10:54.232 # Warning: no config file specified, using the default config. In order to specify a confi..

$ docker pull redis


-d는 컨테이너를 백그라운드로 실행하라는 것 

$ docker run --name myredis -d redis


$ docker logs 809b11ac4b56

1:C 09 Jul 03:10:54.232 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo

1:C 09 Jul 03:10:54.232 # Redis version=4.0.10, bits=64, commit=00000000, modified=0, pid=1, just started

1:C 09 Jul 03:10:54.232 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf

1:M 09 Jul 03:10:54.233 * Running mode=standalone, port=6379.

1:M 09 Jul 03:10:54.233 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.

1:M 09 Jul 03:10:54.233 # Server initialized

1:M 09 Jul 03:10:54.233 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.

1:M 09 Jul 03:10:54.233 * Ready to accept connections


redis-cli 용 컨테이너 실행 

--link myredis:redis myredis container를 새로운 컨테이너에서 redis라는 이름으로 참조하라 (docker는 컨테이너 /etc/hosts에 redis를 위한 진입점을 생성하고 myredis의 IP를 가리키게 한다. 이로서 Redis container의 IP 주소를 전달하거나 찾을 필요없이 redis-cli에서 redis라는 호스트 명으로 접근 가능해진다. )

--rm 컨테이너가 종료되면 자동으로 컨테이너를 삭제한다. -d와는 같이 사용될수 없다. 

-it interactive, pseudo tty mode 


$ docker run --rm -it --link myredis:redis redis /bin/bash

root@06589652dbfd:/data# redis-cli -h redis -p 6379

redis:6379> ping

PONG

redis:6379> set "abc" 123

OK

redis:6379> get "abc"

"123"

redis:6379> exit

</div>-->
Programming/Tools 2018. 7. 9. 12:20
Kubernetes 참고자료

ConceptContainer Cluster Architecture : https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture Pods : https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/#pods-and-controllers Service : https://kubernetes.io/docs/concepts/services-networking/service/ Deployments : https://kubernetes.io/docs/concepts/workloads/controllers/deployment/ TutorialsBasics : https://ku..

Concept






Tutorials



Examples

Spring Boot : https://github.com/saturnism/spring-boot-docker

Deploying PHP Guestbook application with Redis : https://kubernetes.io/docs/tutorials/stateless-application/guestbook/#start-up-the-redis-master


Articles

구글이 만든 Docker Container Orchestration 툴, Kubernetes 소개 : http://www.popit.kr/kubernetes-introduction/


The Distributed System ToolKit: Patterns for Composite Containers : http://blog.kubernetes.io/2015/06/the-distributed-system-toolkit-patterns.html

WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, and operations




Related


'Programming > GCP' 카테고리의 다른 글

kubernetes pod의 redis-cli 접근하기  (0) 2017.11.23
pod restart하기  (0) 2017.11.23
Java Application GKE Kubernetes 적용하기  (0) 2017.11.14
GCP Instance에 ssh 연결하기  (0) 2017.10.23
</div>-->
Programming/GCP 2017. 11. 15. 22:24
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함