From e977c3028d1bb0993b6c5bf29fcfb98b84d0870a Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 21 Apr 2020 19:58:08 +0200 Subject: [pkg] update to eoan, go versions, add helper script --- docker/Dockerfile | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'docker/Dockerfile') diff --git a/docker/Dockerfile b/docker/Dockerfile index 35f9543..e9d3bc1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -3,12 +3,12 @@ # we start with 18.04 (bionic) to match the core18 used in the snap # but we will have to install a couple of extras on top... -FROM ubuntu:18.04 +FROM ubuntu:18.04 as builder MAINTAINER LEAP Encryption Access Project -LABEL Description="An image to build Bitmask Lite" Vendor="LEAP" Version="1.1" +LABEL Description="An image to build Bitmask Lite" Vendor="LEAP" Version="1.2" ENV OSXSDK_SHA256="631b4144c6bf75bf7a4d480d685a9b5bda10ee8d03dbf0db829391e2ef858789" \ - PATH="$PATH:/osxcross/target/bin" + PATH="$PATH:/osxcross/target/bin:/usr/lib/go-1.12/bin" RUN apt-get update && apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ @@ -16,6 +16,7 @@ RUN apt-get update && apt-get upgrade -y && \ make cmake \ git curl wget \ libappindicator3-dev libgtk-3-dev \ + webkit2gtk-4.0 \ mingw-w64 upx-ucl python snapcraft \ unzip \ devscripts fakeroot debhelper \ @@ -25,17 +26,19 @@ RUN apt-get update && apt-get upgrade -y && \ software-properties-common dh-golang && \ add-apt-repository -y ppa:longsleep/golang-backports && \ apt-get update && \ - apt-get install -y --no-install-recommends golang-1.14-go golang-golang-x-tools-dev + apt-get install -y --no-install-recommends golang-1.12-go golang-golang-x-tools-dev && \ + rm -r /var/lib/apt/lists/* # version in 18.04 (bionic) is too old RUN wget http://archive.ubuntu.com/ubuntu/pool/universe/g/golang-x-text/golang-golang-x-text-dev_0.3.2-1_all.deb && \ dpkg -i golang-golang-x-text-dev_0.3.2-1_all.deb # we also need a newer nsis version -RUN echo "deb http://de.archive.ubuntu.com/ubuntu disco main universe" >> /etc/apt/sources.list && \ +RUN echo "deb http://de.archive.ubuntu.com/ubuntu eoan main universe" >> /etc/apt/sources.list && \ apt-get update && \ apt-get install -y --no-install-recommends nsis && \ - sed -i '$ d' /etc/apt/sources.list && apt-get update + sed -i '$ d' /etc/apt/sources.list && apt-get update && \ + rm -r /var/lib/apt/lists/* # osx cross compiling RUN git clone https://github.com/tpoechtrager/osxcross && \ @@ -54,3 +57,12 @@ RUN git clone https://github.com/VantaInc/xar && \ cd xar/xar && \ ./autogen.sh && ./configure && \ make && sudo make install + +# cache go modules +RUN rm -rf /gomods && mkdir -p /gomods/packages +WORKDIR /gomods +COPY mods/go.* /gomods/ +COPY mods/packages/ /gomods/packages/ +RUN go mod download + +COPY builder.sh / -- cgit v1.2.3