diff options
author | Jakob Borg <jakob@kastelo.net> | 2020-02-14 10:44:31 +0100 |
---|---|---|
committer | Jakob Borg <jakob@kastelo.net> | 2020-02-14 10:44:31 +0100 |
commit | 3e0241ea31af1c0f298a532c9ea60016ead60995 (patch) | |
tree | adaeae3fd0e0bd91d8a1673cac32460c72b8ffe6 /Dockerfile.builder | |
parent | bb375b1affadb00cdeaf419ce0dc252610c031ec (diff) | |
download | syncthing-3e0241ea31af1c0f298a532c9ea60016ead60995.tar.gz syncthing-3e0241ea31af1c0f298a532c9ea60016ead60995.zip |
build: Dockerfile for the builder image
Diffstat (limited to 'Dockerfile.builder')
-rw-r--r-- | Dockerfile.builder | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Dockerfile.builder b/Dockerfile.builder new file mode 100644 index 000000000..20806cfea --- /dev/null +++ b/Dockerfile.builder @@ -0,0 +1,26 @@ +# 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 + +# Otherwise we base on the Go image, which is Debian based. +FROM golang + +# 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" + +# FPM to build Debian packages +RUN apt-get update && apt-get install -y --no-install-recommends \ + locales rubygems ruby-dev \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ + && gem install --no-ri --no-rdoc fpm \ + && locale-gen en_US.UTF-8 |