I am new to Docker and trying to run a container in Docker on my macOS so it doesn’t run on persistent memory. On my Linux machine, I figured I can execute it this way:
sudo docker run -dit --name minemeld --restart unless-stopped --tmpfs /run -v minemeld-local:/opt/minemeld/local -v minemeld-logs:/opt/minemeld/log -p 443:443 -p 80:80 paloaltonetworks/minemeld
However, though macOS takes this command, the container doesn’t run as intended. Specifically, I see the following messages:
Regenarating CA bundle
2020-01-10T18:54:01 (232)cacert_merge.main INFO: config: {'cafile': ['/opt/minemeld/local/certs/site/'], 'dst': '/opt/minemeld/local/certs/bundle.crt', 'config': '/opt/minemeld/local/certs/cacert-merge-config.yml', 'no_merge_certifi': False}
(integer) 0
setfacl: /var/run/redis: Operation not supported
minemeld: checking if dependencies are running...
run: redis: (pid 17) 22s
run: collectd: (pid 22) 22s
Copying constraints
Regenarating CA bundle
I have created a RAM disk for now called “DockerDisk:
SJCMAC:~ jaydee$ ls /Volumes/
DockerDisk Macintosh HD Recovery
How do I run my docker container to point to this volume? In other words, what exactly do I change from the syntax above to achieve this on macOS? I’d appreciate any pointers.
2
Answers
Resolved the issue by symlink'ing my docker volumes with the disk image drive I created and then started the container without tmpfs.
Docker for Mac
doesn’t supporttmpfs
. It’s linux specific feature.