coreos

Redis sentinel docker image / Dockerfile

风格不统一 提交于 2019-12-03 00:15:40
I'm looking to deploy high availability Redis on a coreOS cluster, and I need a Redis Sentinel docker image (i.e. Dockerfile) that works. I've gathered enough information/expertise to create one (I think)... but my limited knowledge/experience with advanced networking is the only thing keeping me from building and sharing it. Can someone who is an expert here help me developing a Redis Sentinel Dockerfile (none exist right now)? The Redis/Docker community would really benefit from this. Here's the broader issue and context: https://github.com/antirez/redis/pull/1908 I think the solution is

Docker: Nginx and php5-fpm dockers are not talking

旧街凉风 提交于 2019-12-02 23:16:52
I’d like to make a fully dockerized Drupal install. My first step is to get containers running with Nginx and php5-fpm, both Debian based. I’m on CoreOS alpha channel (using Digital Ocean.) My Dockerfiles are the following: Nginx: FROM debian MAINTAINER fvhemert RUN apt-get update && apt-get install -y nginx && echo "\ndaemon off;" >> /etc/nginx/nginx.conf CMD ["nginx"] EXPOSE 80 This container build and runs nicely. I see the default Nginx page on my server ip. Php5-fpm: FROM debian MAINTAINER fvhemert RUN apt-get update && apt-get install -y \ php5-fpm \ && sed 's/;daemonize = yes/daemonize

how do I clean up my docker host machine

半世苍凉 提交于 2019-12-02 16:47:15
As I create/debug a docker image/container docker seems to be leaving all sorts of artifacts on my system. (at one point there was a 48 image limit) But the last time I looked there were 20-25 images; docker images . So the overarching questions are: how does one properly cleanup? as I was manually deleting images more started to arrive. huh? how much disk space should I really allocate to the host? will running daemons really restart after the next reboot? and the meta question... what questions have I not asked that need to be? It can also be helpful to remove "dangling" images docker rmi $

Docker container logs taking all my disk space

狂风中的少年 提交于 2019-12-02 16:29:01
I am running a container on a VM. My container is writing logs by default to /var/lib/docker/containers/CONTAINER_ID/CONTAINER_ID-json.log file until the disk is full. Currently, I have to delete manually this file to avoid the disk to be full. I read that in Docker 1.8 there will be a parameter to rotate the logs . What would you recommend as the current workaround? poiuytrez Docker 1.8 has been released with a log rotation option. Adding: --log-opt max-size=50m when the container is launched does the trick. You can learn more at: https://docs.docker.com/engine/admin/logging/overview/ CAUTION

How to auto restart a Docker container after a reboot in CoreOS?

Deadly 提交于 2019-12-02 16:12:06
Assuming the Docker daemon is restarted automatically by whatever init.d or systemd like process when the OS is restarted, what is the preferred way to restart one or more Docker containers? For example I might have a number of web servers behind a reverse proxy or a database server. CoreOS uses systemd to manage long running services: https://coreos.com/os/docs/latest/getting-started-with-systemd.html if you start the daemon with docker -d -r , it will restart all containers that were running prior the daemon stopped. This will become the default behavior in the next release. What worked for

how to clean up docker overlay directory?

浪子不回头ぞ 提交于 2019-12-02 15:48:48
I'm running docker via CoreOS and AWS's ECS. I had a failing image that got restarted many times, and the containers are still around- they filled my drive partition. Specifically, /var/lib/docker/overlay/ contains a large number of files/directories. I know that docker-cleanup-volumes is a thing, but it cleans the /volumes directory, not the /overlay directory. docker ps -a shows over 250 start attempts on my bad docker container. They aren't running, though. Aside from rm -rf /var/lib/docker/overlay/* , how can I/should I clean this up? From our side we used: sudo docker system prune -a -f

Etcd安装和使用

只谈情不闲聊 提交于 2019-12-02 14:52:35
Etcd安装和使用 一.安装 1.1 二进制安装 从这里下载: etcd-v3.2.11-linux-amd64.tar.gz 下载包后解压即可运行: # 解压 tar zxvf etcd-v3.2.11-linux-amd64.tar.gz cd etcd-v3.2.11-linux-amd64 # ETCD版本 etcd --version # 客户端接口版本 etcdctl --version # API3的要这样 ETCDCTL_API=3 etcdctl version # 启动也很简单 ./etcd # 试试 ETCDCTL_API=3 etcdctl --endpoints=localhost:2379 put foo bar ETCDCTL_API=3 etcdctl --endpoints=localhost:2379 get foo 1.2 源码安装 安装好Golang环境: 见 Golang环境配置 go get -u -v https://github.com/coreos/etcd ./build 启动: ./etcd 1.3 docker安装 拉镜像: docker pull quay.io/coreos/etcd 启动: docker run -it --rm -p 2379:2379 -p 2380:2380 --name etcd quay.io

How do I run python on my Vagrant vm instance that is CoreOS?

血红的双手。 提交于 2019-12-02 10:15:35
How do I run python on my Vagrant vm instance that is CoreOS? I would like to access the python interpreter. Thanks! You can also install python on CoreOS using the below script, let's call it install_python.sh : #!/bin/bash -e PYPY_VERSION=5.10.1 wget -O - https://bitbucket.org/pypy/pypy/downloads/pypy3-v$PYPY_VERSION-linux64.tar.bz2 |tar -xjf - mv -n pypy3-v$PYPY_VERSION-linux64 pypy ## library fixup mkdir -p pypy/lib if [[ -f /lib64/libncurses.so.5.9 ]]; then libncurses_version=5.9 else libncurses_version=6 fi ln -snf /lib64/libncurses.so.$libncurses_version $HOME/pypy/lib/libtinfo.so.5

“kubectl exec” results in “error: unable to upgrade connection: Unauthorized”

筅森魡賤 提交于 2019-12-01 07:09:38
问题 I tried kubectl exec on a k8s 1.6.4 RBAC-enabled cluster and the error returned was: error: unable to upgrade connection: Unauthorized . docker exec on the same container succeeds. Otherwise, kubectl is working. kubectl tunnels through an SSH connection but I don't think this is the issue. kubelet authn is enabled but not authz. The docs say that authz is AlwaysAllow by default, so I have left it this way. I have a feeling that it is similar to this issue. But the error message is a tad

Can I clean /var/lib/docker/tmp?

☆樱花仙子☆ 提交于 2019-11-30 17:50:34
My server is CoreOS. There are so many files in /var/lib/docker/tmp , their name's like " GetV2ImageBlob998303926 ". The size of all GetV2ImageBlobxxxxxxxx files is 640MB. Can I remove all files in /var/lib/docker/tmp ? This is reported in issues/14506 , and addressed in PR 14389 , now PR 15414 . Ensure images downloaded by pullTagV2 are always cleaned up Previously, if only some of the downloads succeed, we would not close and delete the file handles. This does change the behavior of the registration to block on all downloads completing (whereas previously it would exit early after the first