Running FileMaker Server in Docker Desktop

Being able to develop and test your solutions within a FileMaker Server environment is the ideal scenario. You can test Perform Script On Server, external binaries, and plug-ins that perform a variety of tasks. Essentially, you can perform all the necessary tasks in a real solution.

When you develop your FileMaker solution locally with a single copy of Claris/FileMaker Pro, you not only face limitations in what you can test but also risk the possibility of a crash. While running FileMaker Server on your local machine is a satisfactory solution, the next step is being able to run multiple versions of FileMaker Server without the need for multiple uninstall/install scenarios.

This video showcases my return to using Docker Desktop on an M1 Mac Studio ARM-based machine. Previously, I had to stop using Docker and resort to a full virtual machine when I switched to using Apple Silicon. However, with the release of an ARM-based version of FileMaker Server and most plug-ins being available for the ARM architecture, we are now able to use Docker Desktop again. The trick lies in learning how to use containers. This video provides a great opportunity to learn a new skill. If you want to run multiple variations of FileMaker Server on your M1 or M2 Mac, this video has what you need.

Comments

Thanks for taking the time to make great videos. Looking forward to setting up Docker and FMS.

---- Nash

I can't seem to find where the resource files are on the FDS area on Claris. Is there a link that you can post to these files?

Thanks

-- Nash

---- Nash

The files you need are part of a FileMaker Server installation. You need to install a Linux FileMaker server somewhere then you'll find them within a Tools subfolder.

Installing into a local VM (Parallels, VM Ware, VirtualBox) will give you access to the Docker files.

-- Matt Petrowsky - ISO FileMaker Magazine Editor

Matt are saying you need to install the .deb file on a Mac; to get the install scripts to then install the image record of FMS in docker? I am on a Mac can your just install the .deb via terminal and scripts will appear? Will you not get the script file if you install the .dmg file on the Mac and finally, once you have the scripts do uninstall the FMS local, before creating the image record of FMS in docker? Thanks for your help.

If you don't have the docker files in order to create the container, then you need to get those first. Those, you can only get with a normal install. You can install into a virtual machine or on a physical Mac or Windows I think. I have personally only installed into a linux VM and Mac.

After you get the docker files (for creating the container) then you can modify them to work with a local docker install. By default, they are structured to work within a linux environment and you need to modify some values to static values.

Once you get a functioning container, you can both update the OS within the container and also update FileMaker Server within it.

Hope this helps.

-- Matt Petrowsky - ISO FileMaker Magazine Editor

Big help.
The script was only building the fms-secondary. So, with EXPORT=0, PRIMARY=1 and IMPORT = 0. I adjust line 323 and add in a note to force the IP address. Here are the changes. # Corrected 'docker run' command for host network (NETWORK=0) with sharing (SHARE=1)
OUTPUT=$(docker run --detach --hostname fms-primary --name fms-primary --privileged -p 80:80 -p 443:443 -p 5003:5003 -p 2399:2399 --memory=$MEMORY --cpus=$NUMBEROFCORES --volume $CURDIR:/install --volume "/opt/FileMaker/FileMaker Server/Data":"/opt/FileMaker/FileMaker Server/Data" --volume "/opt/FileMaker/FileMaker Server/CStore":"/opt/FileMaker/FileMaker Server/CStore" --volume "/opt/FileMaker/FileMaker Server/Logs":"/opt/FileMaker/FileMaker Server/Logs" fmsdocker:prep)

There are two other steps after this.
2. Had to create a new network called "fmsnetwork" that has the "bridge" as the driver.
3. Had to create and run a similar run.sh in the video to get the volume, mounting, ports, all binded up and connected.

But, Matt is kinda right. Pretty sweet how fast it is.

If you have problems with the docker build command failing then you may need to add --network=host to get a successful build.

-- Matt Petrowsky - ISO FileMaker Magazine Editor

I ran into issues trying to set this up the way you did in the video. The method in the video ends up being shared resources with bind mounts. Every time I tried (and I've tried for 2 days now), I would get privilege (r/w/x) issues when the FMS installer would try and set the license data in CStore. I set user and group to myself and made sure over and over that privileges on the folders were correct. I even tried moving the mount point on the host to my desktop and allowed Mac security for Docker to access that directory. Still no luck.

I ended up switching to using Docker Volumes. It will be a pain to move databases in and out of the volume, but it is working now.

Any idea why I was running into privilege issues? When the FMS install script first creates the license folder in CStore, the license folder has no privileges (i.e. d---------). This made it unusable.

When setting up on another machine I found an obscure comment within the issue queue of Docker for mac.

Check your General settings in Docker and see if the bind mounts are using the default VirtioFS. If so, then switch to gRPC FUSE and see if that fixes any permissions issues.

Further research has shown other issues related to performance and the default VirtioFS.

https://github.com/docker/for-mac/issues/6667

And funny enough...

It was this issue that got me to check the file system I had used when setting up on my M1. https://github.com/docker/for-mac/issues/6958 I had just purchased an M2 laptop and while this was unrelated, it did trigger a memory I had about prior permissions issues and having to switch to gRPC FUSE because it's older and possibly a bit more stable for some types of images/containers with local binds.

-- Matt Petrowsky - ISO FileMaker Magazine Editor

That worked! It was the wildest issue. Within the container, I could make files or directories in local binds when I did it from a container command line, but the apt install process within the container would fail when it tried to make a directory.

Thanks for the fix. I'll also re-post your fix on the FM community post I made.

Thank you for all the content here Matt; this is a great resource!

Alex

Have you tried this with the latest version of FileMaker Server, 21.01 ? Following your great video I have a running Docker Container running Ubuntu, which I can log in to, but there was an error with the FileMaker installation:


Errors were encountered while processing:
/tmp/apt-dpkg-install-7IxKoW/189-filemaker-server-21.0.1.51-arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
- Finished Setting up Primary Container
- Restarting Primary Container
==== Completed

From within the running Ubuntu container I tried re-installing FileMaker Server, with a fresh download of the installer deb package but in the end I got the same dpkg error.

Wondering if there is something different about FMS 21 that will not run in a Container?

MacOS 14.5 Sonoma, M2 Pro Chip