Permalink
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 preinstall.sh /app/src/github.com/die-net/fotomat/
RUN \
# 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/github.com/die-net/fotomat/preinstall.sh && \
# 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/github.com/die-net/fotomat/
RUN \
# Build, install, and test fotomat
GOPATH=/app /usr/local/go/bin/go get -tags vips_static -t github.com/die-net/fotomat/... && \
GOPATH=/app /usr/local/go/bin/go test -tags vips_static -v github.com/die-net/fotomat/... && \
# Build the dpkg.
/app/src/github.com/die-net/fotomat/dist/build-dpkg /app/bin/fotomat