summaryrefslogtreecommitdiff
path: root/docker/Dockerfile
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2020-04-21 19:58:08 +0200
committerkali kaneko (leap communications) <kali@leap.se>2020-04-30 22:10:24 +0200
commite977c3028d1bb0993b6c5bf29fcfb98b84d0870a (patch)
treede052a9c6c13be05c98945700b8f15b8a14c2af3 /docker/Dockerfile
parentb093455df6fb4dc2d9c1339a3ccff0aa6396088b (diff)
[pkg] update to eoan, go versions, add helper script
Diffstat (limited to 'docker/Dockerfile')
-rw-r--r--docker/Dockerfile24
1 files changed, 18 insertions, 6 deletions
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 <info@leap.se>
-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 /