FP Complete

Announcing: pid1 Crate for Easier Rust Docker Images


Introduction The FP Complete team is pleased to announce the release of the pid1 crate, a Rust library for proper signal and zombie reaping of the PID 1 process. When deploying an application in a containerized environment, you typically need to deploy a small init system to forward signals to your application and reap zombies. […]

Our history with containerization

FP Complete has been working with containerization (or OS-level virtualization) since before it was popularized by Docker. What follows is a brief history of how and why we got started using containers, and how our use of containerization has evolved as new technology has emerged. Brief history Our first foray into containerization started at the […]

How to Implement Containers to Streamline Your DevOps Workflow

What are Docker Containers? Docker containers are a form of “lightweight” virtualization They allow a process or process group to run in an environment with its own file system, somewhat like chroot jails , and also with its own process table, users and groups and, optionally, virtual network and resource limits. For most purposes, the […]

Building Haskell Apps with Docker

In this blog post we will show an example of how we can use Docker to build Haskell applications which we then ship inside Docker images. We will observe two cases. First, we will explore the case of developing on the same Linux distro that we are using for deployment (eg. FROM ubuntu:16.04), and then […]

Immutability, Docker, and Haskell’s ST type

In managing projects at FP Complete, I get to see both the software development and devops sides of our engineering practice. Over the years, I’ve been struck by the recurrence of a single word appearing repeatedly in both worlds: immutability. On the software side, one of the strongest tenets of functional programming is immutable data […]

Docker demons: PID-1, orphans, zombies, and signals

There are a number of corner cases to consider when dealing with Docker, multiple processes, and signals. Probably the most famous post on this matter is from the Phusion blog. Here, we’ll see some examples of how to see these problems first hand, and one way to work around it: fpco/pid1. The Phusion blog post […]

The split-image approach to building minimal runtime Docker images

The most common pattern for using Docker to build and deploy software in an image uses a single Dockerfile to build the software and produce the image that gets deployed. The basic pattern goes: FROM base-image RUN install-some-extra-build-tools COPY . /build-directory RUN /build-directory/build-my-software CMD /run/my/software This works, but you end up with a great deal […]

How stack can use Docker under the hood

TL;DR: if you just want to get started use stack‘s Docker support, see the Docker page on the stack wiki. The rest of this post gives background on the benefits, implementation, and reasons for our choices. A brief history Using LXC for containerization is an integral component of the FP Complete Haskell Center and School […]

Haskell Web Server in a 5MB Docker Image

The Problem Recently we needed to redirect all Amazon Elastic Load Balancer (ELB) HTTP traffic to HTTPS. AWS ELB doesn’t provide this automatic redirection as a service. ELB will, however, let you map multiple ports from the ELB into the auto-scaling cluster of nodes attached to that ELB. People usually just point both port 80 […]