Claris Support
The Linux’s FileMaker server installer now have a docker folder which contains a bunch of script to build and deploy a FileMaker Server on docker.
You can rely on it instead of the article.
August 1, 2022
Updates:
This engineering blog describes why you might want to use Claris FileMaker Server with Docker and how to set up a Docker image containing FileMaker Server. You can set up FileMaker Server in a Docker container as a primary or secondary machine to deploy your database.
Notes:
- Running FileMaker Server in a Docker container with Ubuntu 20.04 is not supported for Mac computers with Apple silicon. You will be able to install FileMaker Server, but you may run into errors when setting up the server as a primary or secondary machine. However, you can install FileMaker Server in a Docker Container with Ubuntu 20.04 on an Intel-based Mac computer, then connect that computer to a Mac with Apple silicon.
- The extracted Linux version of the FileMaker Server installer includes the
Docker
folder containing thefms_Docker_Installer.sh
script. Running this script is the recommended method for creating a Docker container for FileMaker Server. TheREADME.md
file included in the same folder provides directions on how to use the script. For manual instructions on running FileMaker Server in a Docker container, keep reading the remainder of this blog.
List of topics in this blog:
- What is Docker?
- Why use Docker to run FileMaker Server?
- Create the Docker image containing FileMaker Server
What is Docker?
Docker is a container technology that allows developers to package an application and its dependencies into a single, virtual, isolated software unit called a Docker image. Customers can run the image on a variety of hardware and operating systems.
You use a Docker image to build a Docker container. A Docker container is a running software package that includes an application and its dependencies.
Why use Docker to run FileMaker Server?
Running FileMaker Server within a Docker container provides the following benefits:
- Portability. You can easily move the container to a different machine.
- Consistency. You can expect the FileMaker Server installation to work on any host in the same way because the Docker container remains unchanged.
- Testability. Consistency makes it possible to copy the container elsewhere and run extensive tests without needing to install FileMaker Server on new hardware.
- Comparability. Versions of a container can be saved, so errors on the current container can be compared with a previous valid version.
Create the Docker image containing FileMaker Server
To create the complete Docker image, follow these steps:
Step 1: Ensure that FileMaker Server is not running.
If FileMaker Server is running, make sure to save your database, then stop FileMaker Server. See Starting or Stopping FileMaker Server Components.
Step 2: Install and run Docker.
For installation instructions on your operating system, see Get Started with Docker.
Step 3: Download an Ubuntu 20.04 image.
To download the image, start your command terminal (Terminal, Command Prompt, or other) and type the following command:
docker pull amd64/ubuntu:20.04
Step 4: Install FileMaker Server dependencies.
Step 5: Install FileMaker Server.
Step 6: Run FileMaker Server in the container..
Install FileMaker Server dependencies
Before you install FileMaker Server, you need to add important system dependencies to the base Ubuntu image. Do this by creating a new image layer on top of the original Ubuntu image. The easiest way to create the updated image is an automated process using a Dockerfile. A Dockerfile is a file that lists automated steps used to create a new Docker image.
Create a text file with the following contents and name it Dockerfile. Put this file into an empty sub-folder in your home directory.
FROM amd64/ubuntu:20.04 # update all software download sources RUN DEBIAN_FRONTEND=noninteractive \ apt update # upgrade all installed software # packages RUN DEBIAN_FRONTEND=noninteractive \ apt full-upgrade -y # install the FileMaker Server # dependencies RUN DEBIAN_FRONTEND=noninteractive \ apt install -y \ acl \ apache2-bin \ apache2-utils \ avahi-daemon \ curl \ fonts-baekmuk \ fonts-liberation2 \ fonts-noto \ fonts-takao \ fonts-wqy-zenhei \ libaio1 \ libantlr3c-3.4-0 \ libavahi-client3 \ libboost-chrono1.71.0 \ libboost-system1.71.0 \ libboost-thread1.71.0 \ libbz2-1.0 \ libc++1-12 \ libcurl3-gnutls \ libcurl4 \ libdispatch0 \ libdjvulibre21 \ libetpan20 \ libevent-2.1-7 \ libexpat1 \ libfontconfig1 \ libfreetype6 \ libgomp1 \ libheif1 \ libicu66 \ libilmbase24 \ libjpeg-turbo8 \ liblqr-1-0 \ liblzma5 \ libodbc1 \ libomp5-12 \ libopencv-core4.2 \ libopencv-highgui4.2 \ libopencv-imgproc4.2 \ libopenexr24 \ libpam0g \ libpng16-16 \ libsasl2-2 \ libtiff5 \ libuuid1 \ libvpx6 \ libwebpdemux2 \ libwebpmux3 \ libxml2 \ libxpm4 \ libxslt1.1 \ libzbar0 \ logrotate \ nginx \ odbcinst1debian2 \ openjdk-17-jdk \ openssl \ policycoreutils \ sysstat \ ufw \ unzip \ zip \ zlib1g # install user management RUN DEBIAN_FRONTEND=noninteractive \ apt install -y \ init # clean up installations RUN DEBIAN_FRONTEND=noninteractive \ apt --fix-broken install -y RUN DEBIAN_FRONTEND=noninteractive \ apt autoremove -y RUN DEBIAN_FRONTEND=noninteractive \ apt clean -y # document the ports that should be # published when FileMaker Server # is installed EXPOSE 80 EXPOSE 443 EXPOSE 2399 EXPOSE 5003 # when containers run, start this # command as root to initialize # user management USER root CMD ["/sbin/init"]
Run the following command from the same directory as the Dockerfile to create a new image. This command will create the fmsdocker
image and tag it with the prep
label.
Note: The trailing ‘.’ in the following command indicates that the Dockerfile is in the working directory. The working directory should contain only the Dockerfile and no other content.
docker build -t fmsdocker:prep .
Once this build step completes, you have an fmsdocker:prep image that has all the FileMaker Server dependencies.
Install FileMaker Server
Use the following steps to install FileMaker Server into the running container:
Step 1: Run the fmsdocker:prep
image as a background, detached container.
The container will mount host directories as shared volumes. In the command below, replace <installation_file_dir> with your host’s local directory that contains the Linux installation package for FileMaker Server. For example, if the Linux installation file is at /tmp/filemaker-server-21.0.2.202-amd64.deb
on the host, replace <installation_file_dir> with /tmp
. Similarly, if you will store data in the shared folder /Users/Tom/Database
, replace <shared_FM_dir> with the actual shared folder name /Users/Tom/Database
.
By default, FileMaker Server databases are stored in /opt/FileMaker/FileMaker Server/Data
.
docker run \ --detach \ --hostname fms-docker \ --name fms-docker \ --privileged \ --publish 80:80 \ --publish 443:443 \ --publish 2399:2399 \ --publish 5003:5003 \ --volume \ <installation_file_dir>:/install \ --volume \ <shared_FM_dir>:"/opt/FileMaker/FileMaker Server/Data" \ fmsdocker:prep
Step 2: Create a terminal session in the container with this command:
docker exec \ -it \ fms-docker \ /bin/bash
You are now in a command shell within the fms-docker
container, which was created from the fmsdocker:prep
image.
Step 3: Install FileMaker Server.
Now that you have a container that has all the FileMaker Server dependencies, change the directory to the installation file’s location and run the installation. This installation assumes you are using an assisted install with an “Assisted Install.txt” file. Prepare this file and put it in the <installation_file_dir> before executing the next commands. Replace <fms_package_file> with your installation file, which may look similar to the following file name: filemaker-server-21.0.2.202-amd64.deb
.
cd /install
FM_ASSISTED_INSTALL=/install apt install /install/<fms_package_file>
After the installation, you can exit the container shell.
Step 4: If you are installing FileMaker Server on a secondary machine, follow these steps:
- Find the IP address of the FileMaker Server primary machine.To set up a connection between your primary and secondary machines, you need the IP address of the FileMaker Server primary machine and the IP address of the machine where you installed the Docker container.To find the IP address of the primary machine, In FileMaker Server Admin Console, click Configuration. Copy the address next to Server IP Address and save it as your <primary IP>.
- Find the IP address of the machine with the docker container.In Ubuntu, open a command terminal, and enter this command to find the IP address:
ip add show
Copy the IP address and save it as your <secondary IP>. - Connect the Primary and the Secondary machines.On the secondary machine, open a command terminal, and enter the following command. This command connects the secondary web publishing engine (wpe) to the primary machine.Substitute <primary IP> with the primary IP and <secondary IP> with the secondary IP.
fmsadmin wpe add <primary> <secondary>
Step 5: Create a new Docker image from the running container.
From your host command shell, create a new image from the running fms-docker container. This new image is the final image that contains all FileMaker Server dependencies. Use the following commands to create the new image:
docker commit fms-docker fmsdocker:final
docker stop fms-docker
docker container rm fms-docker
Run FileMaker Server in the container
Run the final Docker image from your local host:
docker run \ --detach \ --hostname fms-docker \ --name fms-docker \ --privileged \ --publish 80:80 \ --publish 443:443 \ --publish 2399:2399 \ --publish 5003:5003 \ --volume \ <shared_FM_dir>:"/opt/FileMaker/FileMaker Server/Data" \ fmsdocker:final
Notice that you use a --volume
parameter to define a shared storage volume. A container’s file system is normally isolated and disappears as soon as the container is stopped or removed. By mapping a local host directory to the container’s /opt/FileMaker/FileMaker Server/Data
directory, you ensure database files persist from one container invocation to another.
You will be able to access the server’s admin dashboard from the browser. Use this URL to access the FileMaker Server Admin Console from a browser: https://localhost/admin-console/.
For a production Docker container, you need to install FileMaker Server using a valid SSL certificate. You will then be able to see the sign-in page of FileMaker Server Admin Console without any browser warnings. For more information about using an SSL certificate, see Importing an SSL certificate during deployment in FileMaker Server Help.
Sign in to your test server with the administrator user name and password you specified in the “Assisted Install.txt” file.
Now that you’ve created a fully functional Docker image, you can easily experiment with CPU and memory configurations to tune server performance. You will also be able to use this image on a variety of machines and operating systems, allowing you to deploy FileMaker Server with minimal effort.
Additional resources
Use the following resources to learn more about installing FileMaker Server:
- FileMaker Server Installation and Configuration Guide
- Assisted Installation
- Requesting an SSL certificate
Updates for July 2024
- Updated dependencies for FileMaker Server 2024.
- Referenced the Docker installation script included with the Linux version of the FileMaker Server installer.