Comments (5)
If I follow correctly, the files on your mac (not in the container) are at /tmp. The /tmp directory is deleted anytime a reboot happens on the host (mac) system. This is the same as a linux box. This is not related to d4m-nfs. I would suggest moving the directory location else where on the mac.
from d4m-nfs.
Thanks for your feedback @if-kyle !
So my Docker shared folder would be something different from "/tmp" like "/mynewtmp". Then my docker-compose.yml mysql service would look like:
db:
build: docker/mysql
volumes:
- /mynewtmp/docker/project1/mysql:/var/lib/mysql
environment:
Is this correct?
Is a volume declaration of ./data/mysql:/var/lib/mysql
for my mysql service not possible? Like just placing it inside my project and the same for my other projects?
Thanks!
from d4m-nfs.
@leolandotan we don't use relative paths here, but it sounds like it works fine for others, see: #5
from d4m-nfs.
Hi @if-kenn !
Thanks for the link. My apologies for being noob here.
Here are my configurations so far that worked:
d4m-nfs/etc/d4m-nfs-mounts.txt
/Users:/Users:0:0
Docker > Preferences > File Sharing
/tmp
/etc/exports
# d4m-nfs exports
"/Users" -alldirs -mapall=0:0 localhost
/tmp/d4m-mount-nfs.sh
ln -nsf /tmp/d4m-apk-cache /etc/apk/cache
apk update
apk add nfs-utils sntpc
rpcbind -s > /dev/null 2>&1
DEFGW=$(ip route|awk '/default/{print $3}')
FSTAB="\n\n# d4m-nfs mounts\n"
if true && ! $(grep ':/mnt' /tmp/d4m-nfs-mounts.txt > /dev/null 2>&1); then
mkdir -p /mnt
FSTAB="${FSTAB}${DEFGW}:/Users/leotan /mnt nfs nolock,local_lock=all 0 0"
fi
if [ -e /tmp/d4m-nfs-mounts.txt ]; then
while read MOUNT; do
DSTDIR=$(echo "$MOUNT" | cut -d: -f2)
mkdir -p ${DSTDIR}
FSTAB="${FSTAB}\n${DEFGW}:$(echo "$MOUNT" | cut -d: -f1) ${DSTDIR} nfs nolock,local_lock=all 0 0"
done < /tmp/d4m-nfs-mounts.txt
fi
if ! $(grep "d4m-nfs mounts" /etc/fstab > /dev/null 2>&1); then
echo adding d4m nfs config to /etc/fstab:
echo -e $FSTAB | tee /etc/fstab
else
echo d4m nfs mounts already exist in /etc/fstab
fi
sntpc -i 10 ${DEFGW} &
sleep .5
mount -a
touch /tmp/d4m-done
/tmp/d4m-nfs-mounts.txt
/Users:/Users:0:0
docker-compose.yml
...
mysql:
image: mysql:5.7
volumes:
- ./data/mysql:/var/lib/mysql
...
I'm using:
- Docker: Version 17.03.1-ce-mac12 (17661) Channel: stable
- d4m-nfs: Latest as of May 19, 2017
Fresh Drupal site installation loads pretty well.
Is there a way to know that the site is really using d4m-nfs like d4m-nfs may be running but the my Docker project isn't using it or as long as d4m-nfs started with no error my project is working with d4m-nfs already?
Thanks!
from d4m-nfs.
From the docker-compose.yml, as long as the ./data/mysql is not in the /tmp directory of your mac, then you are in fact using d4m and not the default (slow) osxfs file system.
You could speed test this by modifying Docker > Preferences > File Sharing
and removing /tmp and replacing it with the location of ./data/mysql
(absolute path), and then do NOT run d4m script before starting your containers.
from d4m-nfs.
Related Issues (20)
- Can't mount volume directory that does not exist on host HOT 10
- Session data file is not created by your uid HOT 4
- Unable to mount home dir to /mnt HOT 12
- Running d4m-nfs.sh gives something wrong with /etc/exports file error. HOT 9
- mount.nfs: requested NFS version or transport protocol is not supported HOT 14
- Error with mounting volumes with docker-compose HOT 6
- Cannot docker-compose up on laradock: Mounts denied HOT 13
- Not allowed to stop the nfsd service on Mac OS 10.12.4 HOT 6
- Cannot start service applications: Mounts denied HOT 13
- Vagrant entries in /etc/exports causes ./d4m-nfs.sh to fail HOT 5
- Mount Denied HOT 17
- Files and folders are created in the host machine but is owned by root user HOT 3
- ENH: add `mkrakauer-rio/disable-full-sync-on-flush.sh` to start up process. HOT 5
- d4m doing weird things in my console HOT 4
- cp: /tmp/d4m-apk-cache/*: No such file or directory HOT 7
- Issue with webpack HOT 2
- Migrate from d4m-nfs to native Docker NFS Volumes discussion HOT 65
- Blank space on /etc/d4m-nfs-mounts.txt break script d4m-nfs.sh HOT 2
- Script will fail if my home directory is not standard HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d4m-nfs.