Matt Petrowsky, Jul 12, 2023, FileMaker Magazine
Source: https://www.filemakermagazine.com/videos/running-filemaker-server-docker-desktop
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.
Table of Contents
- Introduction
- Benefits of Running FileMaker Server Locally
- Requirements for Docker Desktop Setup
- Docker Fundamentals
- Setting Up Docker Desktop on Apple Silicon (M1/M2) or Intel
- Creating a FileMaker Server Image
- Running FileMaker Server in a Container
- Managing FileMaker Server in Docker
- Advanced Docker Tips for FileMaker Development
- Summary and Key Takeaways
Introduction
Running FileMaker Server in Docker Desktop offers a flexible, isolated environment for developing and testing FileMaker solutions locally. This setup allows you to easily manage multiple versions of FileMaker Server, streamline startup/shutdown processes, and leverage the advantages of containerization for efficient development.
This blog will guide you through the process of installing and configuring FileMaker Server in Docker Desktop on Apple Silicon (M1/M2) or Intel Macs, with detailed instructions on creating a FileMaker Server image, running it in a container, and managing your development environment.
Benefits of Running FileMaker Server Locally
Using a local FileMaker Server for development comes with several benefits:
- Replicates Deployment Environment: Simulates a real-world deployment, offering a reliable testing environment for your solutions.
- Crash Isolation: Protects your development from unexpected crashes by using an isolated server environment.
- Quick Setup: Containers start within seconds, allowing rapid switching between different FileMaker Server versions.
- Portability: Containers can be shared or moved easily, ensuring consistent development environments across teams.
Requirements for Docker Desktop Setup
To successfully set up FileMaker Server in Docker Desktop, you will need:
- Docker Desktop: Installed on an Apple Silicon (M1/M2) or Intel-based Mac.
- Ubuntu Base Image: A compatible Linux distribution, such as Ubuntu 22.04 LTS.
- FileMaker Server Linux Installation File: This
.deb
file is available from your FileMaker developer account. - Terminal and Basic Command Line Knowledge: Familiarity with command-line operations is essential.
Docker Fundamentals
Before diving into the setup, understanding some Docker basics is crucial.
Containers vs. Images
- Image: A snapshot of a system or software, acting like a template. An image includes the operating system, software, and configuration needed to run an application.
- Container: A running instance of an image. Containers are lightweight and isolated, sharing the host’s operating system kernel.
Volumes and Networking in Docker
- Volumes: Storage areas that are shared between the host and container, useful for persisting data such as databases.
- Networking: Docker containers can share network configurations with the host, or use isolated internal networks for communication between containers.
Setting Up Docker Desktop on Apple Silicon (M1/M2) or Intel
Installing Docker Desktop
- Go to Docker’s website and download the appropriate version for your Mac.
- Install Docker Desktop and create a Docker account if required.
- Launch Docker Desktop and verify the installation by running the command:bashCopy code
docker --version
- Enable file sharing to allow Docker containers to access specific folders on your Mac.
Configuring File Sharing for Mac
- Open Docker Desktop and navigate to Settings (gear icon).
- Go to Resources > File Sharing.
- Add the following paths:
/opt/FileMaker/FileMaker Server/Data
/opt/FileMaker/FileMaker Server/Logs
/opt/FileMaker/FileMaker Server/CStore
These directories will be used to share data between your Mac and Docker containers.
Creating a FileMaker Server Image
Preparing the Ubuntu Base Image
- Pull the required Ubuntu version for FileMaker Server. Use the following command:bashCopy code
docker pull ubuntu:22.04
This command downloads the Ubuntu 22.04 LTS image, which is recommended for FileMaker Server 20+.
Using FileMaker’s Docker Script
FileMaker provides a Docker script to create a containerized FileMaker Server environment. This script requires some modifications for compatibility with macOS.
- Download the FileMaker Server installer for Linux (Ubuntu) from your developer account.
- Locate the
FMS Docker Installer Script
provided by FileMaker. Duplicate and rename the script for macOS adjustments.
Modifying the Script for macOS Compatibility
- Open the script in a text editor (e.g., VS Code).
- Adjust the following key variables:
- OS Version: Replace any OS detection commands with a hard-coded version:bashCopy code
UBUNTU_VERSION="22.04"
- File Sharing Paths: Ensure the script references the correct shared directories.
- Networking: Skip or adjust networking options that rely on Linux-only features.
- OS Version: Replace any OS detection commands with a hard-coded version:bashCopy code
- Save the modified script and proceed to build the image.
Running FileMaker Server in a Container
Starting and Stopping the Container
To start the FileMaker Server container:
- Run the Docker command to start a container from your customized image:bashCopy code
docker run -d --name FMS_Server -p 80:80 -p 443:443 -p 5003:5003 \ -v /opt/FileMaker/FileMaker\ Server/Data:/opt/FileMaker/FileMaker\ Server/Data \ -v /opt/FileMaker/FileMaker\ Server/Logs:/opt/FileMaker/FileMaker\ Server/Logs \ -v /opt/FileMaker/FileMaker\ Server/CStore:/opt/FileMaker/FileMaker\ Server/CStore \ ubuntu:22.04
This command runs the container in detached mode (-d
), mapping necessary ports and directories.
Connecting to FileMaker Server Admin Console
- Open a web browser and navigate to:arduinoCopy code
http://localhost/admin-console
- Use the credentials you specified during the FileMaker Server setup to log in.
Stopping the Container
To stop the container, use:
bashCopy codedocker stop FMS_Server
To restart, use:
bashCopy codedocker start FMS_Server
Managing FileMaker Server in Docker
Saving Customized Containers as Images
After configuring FileMaker Server with your preferences (plugins, tools), you can save the container state as an image:
- Use the following command to commit the running container:bashCopy code
docker commit FMS_Server customized_fms_server
Deploying Pre-configured Images
To share your pre-configured image with another developer:
- Save the image to a file:bashCopy code
docker save -o customized_fms_server.tar customized_fms_server
- Provide the
.tar
file to your colleague, who can load the image using:bashCopy codedocker load -i customized_fms_server.tar
Advanced Docker Tips for FileMaker Development
Adding Custom Tools and Plugins
- Access the container’s shell:bashCopy code
docker exec -it FMS_Server /bin/bash
- Install desired tools or plugins using standard Linux commands.
- Once customization is complete, save the container as a new image.
File Management and Backup
FileMaker Server’s data and logs are accessible via the shared directories configured earlier. To back up your data:
- Navigate to
/opt/FileMaker/FileMaker Server/Data
. - Copy the databases to your local backup location.
Summary and Key Takeaways
Running FileMaker Server in Docker Desktop provides an agile development environment that mimics production, isolates server operations, and offers flexibility. Using Docker containers, you can switch between multiple server versions seamlessly, share setups across development teams, and avoid local system interference.
Docker makes FileMaker development more efficient, allowing rapid experimentation, consistent environments, and quick deployments—vital for professional developers.
For additional resources on Docker and FileMaker Server, check out the official documentation and forums for the latest tips and updates.