volumes

Docker - cannot mount volume over existing file, file exists

和自甴很熟 提交于 2020-05-10 04:06:29
问题 I'm trying to build a data container for my application in Docker. I run this command to expose some volumes: docker run --name svenv.nl-data -v /etc/environment -v /etc/ssl/certs -v /var/lib/mysql -d svenv/svenv.nl-data The problem is that i get this error from this command: Error response from daemon: cannot mount volume over existing file, file exists /var/lib/docker/aufs/mnt/aefa66cf55357e2e1e4f84c2d4d2d03fa2375c8900fe3c0e1e6bc02f13e54d05/etc/environment If I understand the Docker

How do write a CSV file in a docker container volume with Java 8?

不问归期 提交于 2019-12-13 07:52:05
问题 I am struggling with docker and the file system. I would like to write a file in a docker volume from my Java application. The main goal is that another application running on the same machine can read the file. I read the related question, but I did not find any answer solving this with a java application. Any idea on how to do this? 回答1: Building on the answer to your other question: How to import a CSV inside a Docker container with Java 8? Example So you have two docker containers with a

How to use a volume label in a Windows path?

偶尔善良 提交于 2019-12-11 01:35:15
问题 I want to copy files off a removable drive using a batch file, regardless of the drive letter it gets. So far, no go. There don't seem to be any readily available commands or 3rd-party command-line tools that would handle paths based on volume labels. I tried FreeFileSync, but it works in big batches, and I need precise file operations here. Also, it doesn't do deletions, and I need to MOVE files off the pendrive. What piques my interest, however, is that issuing a nonsense command like... C:

Docker Named Volume location Mac

吃可爱长大的小学妹 提交于 2019-12-07 18:08:36
问题 I'm using Docker for Mac 1.12.1 and have a docker compose file which starts wordpress and mysql services Compose file version: '2' services: db: container_name: mysql_db image: mysql:5.7 volumes: - "./.data/db:/var/lib/mysql" restart: always environment: MYSQL_ROOT_PASSWORD: wordpress MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress wordpress: container_name: wordpress depends_on: - db image: wordpress:latest links: - db ports: - "8000:80" restart: always environment:

Docker Named Volume location Mac

天涯浪子 提交于 2019-12-05 19:41:20
I'm using Docker for Mac 1.12.1 and have a docker compose file which starts wordpress and mysql services Compose file version: '2' services: db: container_name: mysql_db image: mysql:5.7 volumes: - "./.data/db:/var/lib/mysql" restart: always environment: MYSQL_ROOT_PASSWORD: wordpress MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress wordpress: container_name: wordpress depends_on: - db image: wordpress:latest links: - db ports: - "8000:80" restart: always environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_PASSWORD: wordpress volumes: - wordpress/:/var/www/html/

Docker: change folder where to store docker volumes

蓝咒 提交于 2019-11-30 15:44:28
On my Ubuntu EC2 I host an application using docker containers. db data and upload data is being stored in volumes CaseBook-data-db and CaseBook-data-uploads which are being created with this commands: docker volume create --name=CaseBook-data-db docker volume create --name=CaseBook-data-uploads Volumes being attached through docker-compose file: version: '2' services: mongo: container_name: "CaseBook-db" restart: always image: mongo:3.2.7 ports: - "27017" volumes: - data_db:/data/db labels: - "ENVIRONMENT_TYPE=meteor" app: container_name: "CaseBook-app" restart: always image: "meteor/casebook

Docker: change folder where to store docker volumes

和自甴很熟 提交于 2019-11-29 21:17:52
问题 On my Ubuntu EC2 I host an application using docker containers. db data and upload data is being stored in volumes CaseBook-data-db and CaseBook-data-uploads which are being created with this commands: docker volume create --name=CaseBook-data-db docker volume create --name=CaseBook-data-uploads Volumes being attached through docker-compose file: version: '2' services: mongo: container_name: "CaseBook-db" restart: always image: mongo:3.2.7 ports: - "27017" volumes: - data_db:/data/db labels:

Docker Machine on Mac: Cannot see mounted Volumes on docker host/docker-machine? Where are volumes physically stored?

拈花ヽ惹草 提交于 2019-11-29 13:39:56
问题 Am on a Macbook Pro laptop and running docker-machine (0.5.0) and docker-compose (1.5.0) to get my containers going. This means I'm using docker-machine to create my virtualbox boot2docker driven HOST machines, which will run my docker daemon and host all my containers. I think I'm missing something critical with the concept of HOSTS and VOLUME, as they refer to Docker and the documentation. This is my docker-compose.yml file (web simply builds the php:5.6-apache image): web: restart: "always

how can I create a data-container only using docker-compose.yml?

偶尔善良 提交于 2019-11-29 04:55:53
问题 This question is coming from an issue on the Docker's repository: https://github.com/docker/compose/issues/942 I can't figure it out how to create a data container (no process running) with docker compose. 回答1: Exactly how to do it depends a little on what image you are using for your data-only-container. If your image has an entrypoint , you need to overwrite this in your docker-compose.yml . For example this is a solution for the official MySql image from docker hub: DatabaseData: image:

Debian6 搭建GlusterFS集群-Distributed Volumes

倾然丶 夕夏残阳落幕 提交于 2019-11-29 04:48:32
在你配置glusterfs的volume之前,你需要先创建一个由存储服务器组成的可以信任的存储池,glusterfs服务必须运行在每一台加入存储池的服务器上。 加入一台服务器到可信任存储池 命令:gluster peer probe server-name 在GlusterFS-Server1上加入两台服务器到存储池中,在GlusterFS-Server1上不需要设置加入自己,只需要设置要加入进来的服务器。在加入进来的服务器上会看到GlusterFS-Server1的。 gluster peer probe GlusterFS-Server2 gluster peer probe GlusterFS-Server3 如下图: 检查加入可信任存储池中的服务器状态 命令:gluster peer status gluster peer status 如下图: 从存储池中移除一台服务器 命令:gluster peer detach server gluster peer detach GlusterFS-Server3 如图: 创建glusterfs的volume,volume是bricks的逻辑集合,每一个bricks都是在信任的存储池中服务器上导出的目录,当创建volume的时候,你必须指定volume由那些bricks组成。 创建一个新volume 命令:gluster