volumes

Detect when a volume is mounted on OS X

人走茶凉 提交于 2019-11-28 08:43:26
I have an OS X application that needs to respond to a volume being mounted or unmounted. I've already solved this problem by retrieving the list of volumes periodically and checking for changes, but I'd like to know if there is a better way. Register to the notification center you get from [[NSWorkspace sharedWorkspace] notificationCenter] and then process the notifications you are interested in. These are the volume related ones: NSWorkspaceDidRenameVolumeNotification , NSWorkspaceDidMountNotification , NSWorkspaceWillUnmountNotification and NSWorkspaceDidUnmountNotification . The NSWorkspace

Copying files to a container with Docker Compose

﹥>﹥吖頭↗ 提交于 2019-11-28 04:28:06
I have a Dockerfile where I copy an existing directory (with content) to the container which works fine: Dockerfile FROM php:7.0-apache COPY Frontend/ /var/www/html/aw3somevideo/ COPY Frontend/ /var/www/html/ RUN ls -al /var/www/html RUN chown -R www-data:www-data /var/www/html RUN chmod -R 755 /var/www/html But when I use a docker-compose.yml file there is only the directory aw3somevideo and inside aw3somevideo there is nothing. docker-compose.yml : php: build: php/ volumes: - ./Frontend/ :/var/www/html/ - ./Frontend/index.php :/var/www/html/ ports: - 8100:80 Maybe I do not understand the

Docker creates files as root in mounted volume [duplicate]

对着背影说爱祢 提交于 2019-11-27 14:25:44
问题 This question already has an answer here: Share files between host system and docker container using specific UID 4 answers I'm using Docker (1.3.1) to build RPMs inside a container: docker run -v /home/matt/build:/build build-rpm /build/build-pkg.sh This works fine (my user is in the docker group, so I don't need to sudo) and drops a completed .rpm file in the current directory. The problem is that the file is created as owned by root. How can I arrange it so that the file is created owned

Copying files to a container with Docker Compose

混江龙づ霸主 提交于 2019-11-27 05:21:24
问题 I have a Dockerfile where I copy an existing directory (with content) to the container which works fine: Dockerfile FROM php:7.0-apache COPY Frontend/ /var/www/html/aw3somevideo/ COPY Frontend/ /var/www/html/ RUN ls -al /var/www/html RUN chown -R www-data:www-data /var/www/html RUN chmod -R 755 /var/www/html But when I use a docker-compose.yml file there is only the directory aw3somevideo and inside aw3somevideo there is nothing. docker-compose.yml : php: build: php/ volumes: - ./Frontend/ :

Detect when a volume is mounted on OS X

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 02:24:04
问题 I have an OS X application that needs to respond to a volume being mounted or unmounted. I've already solved this problem by retrieving the list of volumes periodically and checking for changes, but I'd like to know if there is a better way. 回答1: Register to the notification center you get from [[NSWorkspace sharedWorkspace] notificationCenter] and then process the notifications you are interested in. These are the volume related ones: NSWorkspaceDidRenameVolumeNotification ,

docker mounting volumes on host

旧城冷巷雨未停 提交于 2019-11-26 23:36:23
I have successfully been able to share folders between a docker container with volumes using docker run -v /host/path:/container/path ... But my question is what the difference between this and using the VOLUME command in the Dockerfile VOLUME /path I am using an image that has a VOLUME command, and I'd like to know how to share it with my host. I have done it using the -v command above, but I didn't know if I needed both the -v and VOLUME . The VOLUME command will mount a directory inside your container and store any files created or edited inside that directory on your hosts disk outside the

docker mounting volumes on host

淺唱寂寞╮ 提交于 2019-11-26 09:15:13
问题 I have successfully been able to share folders between a docker container with volumes using docker run -v /host/path:/container/path ... But my question is what the difference between this and using the VOLUME command in the Dockerfile VOLUME /path I am using an image that has a VOLUME command, and I\'d like to know how to share it with my host. I have done it using the -v command above, but I didn\'t know if I needed both the -v and VOLUME . 回答1: The VOLUME command will mount a directory