aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile.builder
diff options
context:
space:
mode:
authorJakob Borg <jakob@kastelo.net>2020-02-23 08:40:42 +0100
committerJakob Borg <jakob@kastelo.net>2020-02-23 08:40:42 +0100
commit7b8622c2e9b331b0e1f1eb01653a3fdc46812fbd (patch)
treeb9038dce26e30360f756398e27f93256f475d192 /Dockerfile.builder
parent40e1835927032e4232c75210ed31981281ebde1c (diff)
downloadsyncthing-7b8622c2e9b331b0e1f1eb01653a3fdc46812fbd.tar.gz
syncthing-7b8622c2e9b331b0e1f1eb01653a3fdc46812fbd.zip
build: Simplify build image for snaps
Diffstat (limited to 'Dockerfile.builder')
-rw-r--r--Dockerfile.builder29
1 files changed, 10 insertions, 19 deletions
diff --git a/Dockerfile.builder b/Dockerfile.builder
index 20806cfea..6e7ed90ab 100644
--- a/Dockerfile.builder
+++ b/Dockerfile.builder
@@ -1,26 +1,17 @@
-# It's difficult to install snapcraft (the packaging tool) on a non-snap
-# distribution such as Debian without running snapd (which doesn't work under
-# Docker). We cheat by taking their Docker image and snarfing the resulting
-# binaries.
-FROM snapcore/snapcraft AS snapcraft
+# We will grab the Go compiler from the latest Go image.
+FROM golang as go
-# Otherwise we base on the Go image, which is Debian based.
-FROM golang
+# Otherwise we base on the snapcraft container as that is by far the
+# most complex and tricky thing to get installed and working...
+FROM snapcore/snapcraft
-# The snap stuff, as mentioned, with variables set to let the snapcraft snap play ball
-COPY --from=snapcraft /snap /snap
-ENV LANG="en_US.UTF-8"
-ENV LANGUAGE="en_US:en"
-ENV LC_ALL="en_US.UTF-8"
-ENV SNAP="/snap/snapcraft/current"
-ENV SNAP_NAME="snapcraft"
-ENV SNAP_ARCH="amd64"
-ENV PATH="$PATH:/snap/bin"
+# Go
+COPY --from=go /usr/local/go /usr/local/go
+ENV PATH="/usr/local/go/bin:$PATH"
# FPM to build Debian packages
RUN apt-get update && apt-get install -y --no-install-recommends \
- locales rubygems ruby-dev \
+ locales rubygems ruby-dev build-essential git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
- && gem install --no-ri --no-rdoc fpm \
- && locale-gen en_US.UTF-8
+ && gem install --no-ri --no-rdoc fpm