Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (24 sloc) 1.14 KB
# Build Fotomat dpkg for Debian or Ubuntu using Docker
#
# Run: dist/build debian:buster
#
# And you'll end up with a fotomat*.dpkg in the current directory.
ARG BASE
FROM $BASE
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get dist-upgrade -y -q --no-install-recommends && \
apt-get install -y -q --no-install-recommends fakeroot
# Apt-get our dependencies, download, build, and install VIPS, and download and install Go.
ADD preinstall.sh /app/src/github.com/die-net/fotomat/
RUN CFLAGS="-O2 -ftree-vectorize -msse2 -ffast-math -fPIE" \
VIPS_OPTIONS="--disable-shared --enable-static" \
/app/src/github.com/die-net/fotomat/preinstall.sh
# Add the rest of our code.
ADD . /app/src/github.com/die-net/fotomat/
# Build and install Fotomat
RUN GOPATH=/app CGO_LDFLAGS_ALLOW="-Wl,--export-dynamic" /usr/local/go/bin/go get -ldflags="-s -w" -tags vips_static -t github.com/die-net/fotomat/...
# Test fotomat
RUN GOPATH=/app CGO_LDFLAGS_ALLOW="-Wl,--export-dynamic" /usr/local/go/bin/go test -tags vips_static -v github.com/die-net/fotomat/...
# Build the dpkg.
RUN /app/src/github.com/die-net/fotomat/dist/build-dpkg /app/bin/fotomat
You can’t perform that action at this time.