Docker

Set docker image username at container creation time?

半世苍凉 提交于 2021-02-17 21:25:08
问题 I have an OpenSuse 42.3 docker image that I've configured to run a code. The image has a single user(other than root) called "myuser" that I create during the initial Image generation via the Dockerfile. I have three script files that generate a container from the image based on what operating system a user is on. Question : Can the username "myuser" in the container be set to the username of the user that executes the container generation script? My goal is to let a user pop into the

Cleanup disk space occupied by Docker images

為{幸葍}努か 提交于 2021-02-17 21:17:08
问题 I am running docker on windows 10. I had a couple of images stored in my machine. The total size of these images accumulated to around ~10GB. I have deleted these images via ' docker rmi -f ' command. But the space occupied by these images has not been released. If I run 'docker images' command, the deleted images are not listed in the output of 'docker images' command(but the disk space is not cleaned up). How can I improve (ie. reduce) the disk space used by docker? 回答1: First try to run:

Cleanup disk space occupied by Docker images

拥有回忆 提交于 2021-02-17 21:17:06
问题 I am running docker on windows 10. I had a couple of images stored in my machine. The total size of these images accumulated to around ~10GB. I have deleted these images via ' docker rmi -f ' command. But the space occupied by these images has not been released. If I run 'docker images' command, the deleted images are not listed in the output of 'docker images' command(but the disk space is not cleaned up). How can I improve (ie. reduce) the disk space used by docker? 回答1: First try to run:

Docker: using container with headless Selenium Chromedriver

♀尐吖头ヾ 提交于 2021-02-17 20:57:14
问题 I'm trying to link peroumal1's "docker-chrome-selenium" container to another container with scraping code that uses Selenium. He exposes his container to port 4444 (the default for Selenium), but I'm having trouble accessing it from my scraper container. Here's my docker-compose file: chromedriver: image: eperoumalnaik/docker-chrome-selenium:latest scraper: build: . command: python manage.py scrapy crawl general_course_content volumes: - .:/code ports: - "8000:8000" links: - chromedriver and

Docker: using container with headless Selenium Chromedriver

喜你入骨 提交于 2021-02-17 20:56:39
问题 I'm trying to link peroumal1's "docker-chrome-selenium" container to another container with scraping code that uses Selenium. He exposes his container to port 4444 (the default for Selenium), but I'm having trouble accessing it from my scraper container. Here's my docker-compose file: chromedriver: image: eperoumalnaik/docker-chrome-selenium:latest scraper: build: . command: python manage.py scrapy crawl general_course_content volumes: - .:/code ports: - "8000:8000" links: - chromedriver and

Docker: using container with headless Selenium Chromedriver

随声附和 提交于 2021-02-17 20:56:37
问题 I'm trying to link peroumal1's "docker-chrome-selenium" container to another container with scraping code that uses Selenium. He exposes his container to port 4444 (the default for Selenium), but I'm having trouble accessing it from my scraper container. Here's my docker-compose file: chromedriver: image: eperoumalnaik/docker-chrome-selenium:latest scraper: build: . command: python manage.py scrapy crawl general_course_content volumes: - .:/code ports: - "8000:8000" links: - chromedriver and

How to make Docker container see real user IP?

假如想象 提交于 2021-02-17 19:27:14
问题 The problem Inside nginx-proxy Docker container (more info below), I always see the same IP adress for every connection: 172.18.0.1 (which is the nginx-proxy network gateway). For example: nginx.1 | www.my-site.tld 172.18.0.1 - - [28/Nov/2017:17:22:21 +0000] "GET /some/path HTTP/2.0" 200 46576 "https://www.my-site.tld/some/path" "Mozilla/5.0 (Linux; Android 4.4.2; PSP5507DUO Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 YaBrowser/17.10.0.446.00 Mobile Safari/537.36

一文带你快速入门etcd(万字长文)

≯℡__Kan透↙ 提交于 2021-02-17 19:01:44
2018年12月 etcd 作为孵化项目 CNCF(云原生计算基金会),几天前 CNCF 宣布 etcd 正式毕业,成为 CNCF 顶级项目。CNCF 官方表示 etcd 项目的采用率持续增加,也有稳定的治理流程,功能已达一定成熟度。 etcd 已经被许多公司用于实际生产,其中包括亚马逊、百度、思科、EMC、谷歌、阿里、华为、IBM、Red Hat、Uber、Verizon 等;而且其身影也出现在包括 Kubernetes、CoreDNS、M3、Rook 以及 TiKV 等项目当中。 前面的系列 etcd 文章已经部分介绍了 etcd。本文将会做一个快速入门的介绍,带领大家十分钟快速入门云原生存储组件 etcd,主要内容如下(本文较长,建议收藏): etcd 简介,以及其应用场景 etcd 的多种安装模式及高可用运维 etcd v3 的架构解析 etcdctl 的实践应用 1 etcd 介绍 2013 年 6 月,CoreOS 发起了 etcd 项目。etcd 使用 Go 语言实现,是分布式系统中重要的基础组件,目前最新版本为 V3.4.9。etcd 可以用来构建高可用的分布式键值数据库,根据官网介绍,总结来说有如下的特点: 简单:etcd 的安装简单,且为用户提供了 HTTP API,用户使用起来也很简单 存储:etcd 的基本功能,数据分层存储在文件目录中

docker for windows 使用mssql2017

梦想与她 提交于 2021-02-17 17:00:45
原文: docker for windows 使用mssql2017 确实有些坑,本来之前坑都踩过了,但是时间一久就忘记了,这次换电脑又都踩了一遍。 几个要点(坑): 1.docker安装时默认就好。然后C盘必须设置共享,否则后面做文件夹挂载时总是报错。 2.预设SA密码时,别再搞SASASA这种了,必须使用强密码,例如 Abc!@#123456。 3.宿主机使用MSSM链接数据库时,目前我没有改端口使用1433:1433,则要写 "localhost,1433",而不是冒号。 4.做数据库存储目录共享时,注意宿主机(WIN)目录从盘符开始,:使用/代替,例如: /d/data=d:\data 创建mssql2017容器命令 docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Abc!@#123456' -p 1433:1433 -v /d/sql.data/docker:/var/opt/mssql/data --name mssql2017 -d microsoft/mssql-server-linux:2017-latest 宿主机可以指安装 MSSM就好了,完整的数据库似乎就不需要了。 如果使用的是windows container 则需要拉取 mssql-server-windows-express 使用developer也可以

Docker - ELK - vm.max_map_count

浪尽此生 提交于 2021-02-17 15:20:34
问题 I'm trying to use the docker's image elk-docker (https://elk-docker.readthedocs.io/) , using Docker Compose. The .yml file, is like this: elk: image: sebp/elk ports: - "5601:5601" - "9200:9200" - "5044:5044" When I run the command: sudo docker-compose up, the console shows: * Starting Elasticsearch Server sysctl: setting key "vm.max_map_count": Read-only file system ...fail! waiting for Elasticsearch to be up (1/30) waiting for Elasticsearch to be up (2/30) waiting for Elasticsearch to be up