Skip to content

Instantly share code, notes, and snippets.

@bergercookie
Created December 16, 2025 20:13
Show Gist options
  • Select an option

  • Save bergercookie/18c48f3614a224c4b1794047dece9747 to your computer and use it in GitHub Desktop.

Select an option

Save bergercookie/18c48f3614a224c4b1794047dece9747 to your computer and use it in GitHub Desktop.
Docker-compile afpfs-ng in Ubuntu 16.04

afpfs-ng build environment

  • Create the build environment for afpfs-ng using Docker.

    docker build . -t afpfs-ng-build-env
    
  • Compile afpfs-ng inside the container and output the results to the ./out directory on the host:

    mkdir -p out
    docker run -v ./out:/out afpfs-ng-build-env
    

After this you should find the compiled binaries in the ./out directory on the host.

  • Create debian package, I'm using fpm for this
rm -f afpfs-ng_1.0_amd64.deb && fpm -C out -t deb -s dir -n afpfs-ng .
FROM ubuntu:16.04
# Base build deps
RUN apt-get update && apt-get install -y \
build-essential \
autoconf \
automake \
libtool \
pkg-config \
libfuse-dev \
libreadline-dev \
git \
ca-certificates \
libncurses-dev \
libgmp3-dev \
libgcrypt11-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /build
# Clone and build
RUN git clone https://github.com/simonvetter/afpfs-ng.git
WORKDIR /build/afpfs-ng
# Build and install into /out (mounted volume)
CMD ./configure && \
make -j$(nproc) && \
make install DESTDIR=/out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment