Fetching contributors…
Cannot retrieve contributors at this time
30 lines (22 sloc) 1.08 KB
# Build Fotomat RPM for Debian jessie using Docker.
# Run: dist/build dpkg-jessie
# And you'll end up with a fotomat*.dpkg in the current directory.
FROM debian:jessie
ADD /app/src/
# Apt-get our dependencies, download, build, and install VIPS, and download and install Go.
DEBIAN_FRONTEND=noninteractive CFLAGS="-O2 -ftree-vectorize -msse2 -ffast-math -fPIC" VIPS_OPTIONS="--disable-shared --enable-static" \
/app/src/ && \
# Add dpkg build tool.
DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends fakeroot && \
# Create a few directories
mkdir -p /app/pkg /app/bin
ADD . /app/src/
# Build, install, and test fotomat
GOPATH=/app /usr/local/go/bin/go get -tags vips_static -t && \
GOPATH=/app /usr/local/go/bin/go test -tags vips_static -v && \
# Build the dpkg.
/app/src/ /app/bin/fotomat