Install MemCP with Docker
Install MemCP with Docker
<syntaxhighlight lang="bash">docker pull carli2/memcp:latest docker volume create memcp_data docker run -d --name memcp --restart unless-stopped \
-e ROOT_PASSWORD='replace-with-a-strong-password' \ -v memcp_data:/data -p 4321:4321 -p 3307:3307 \ carli2/memcp:latest</syntaxhighlight>
ROOT_PASSWORD is used only for a fresh /data. The image runs with --no-repl, persists under /data, and forwards stop signals to MemCP. Pin a release tag in production instead of latest. Do not publish either port to an untrusted network without firewall/reverse-proxy protection.
Pass additional flags through PARAMS, for example -e PARAMS='--disable-mysql --api-port=4321'. APP selects the Scheme entry file and defaults to lib/main.scm.
Back up the volume before upgrading. Verify the container log, authenticate a query, restart the container, and verify persisted data after every upgrade.
Build and application development
To test the image produced by the current checkout instead of the published image:
<syntaxhighlight lang="bash">git clone https://github.com/launix-de/memcp.git cd memcp docker build -t memcp-local . docker volume create memcp_dev_data docker run --rm -it \
-e ROOT_PASSWORD='development-password' \ -v memcp_dev_data:/data -p 4321:4321 -p 3307:3307 \ memcp-local</syntaxhighlight>
Interactive mode is useful for Scheme application development; production containers should remain detached and use --no-repl. To load another Scheme entrypoint, mount or bake the application into the image and select it with APP. Use PARAMS only for command-line flags, not as a replacement for the application filename.
Bind mounts such as -v /var/lib/memcp:/data are also supported. Ensure the container user can write the directory and include it in backup and restore procedures.