summaryrefslogtreecommitdiffstats
path: root/scripts/docker
diff options
context:
space:
mode:
authorGravatar Salvador Cuñat <salvador.cunat@gmail.com>2019-01-29 22:58:21 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-05-18 14:43:16 -0700
commitaab658fc9f787bec5461b8202b112e71cb868cf3 (patch)
tree9adea21b13c942b88e7c0588d824e1d39909fdb9 /scripts/docker
parent967f9fb5902c13363cf7d45153168b670c7cbf63 (diff)
downloadsubsurface-aab658fc9f787bec5461b8202b112e71cb868cf3.tar.gz
docker-mxe: Make Dockerfile reusable
Passing an argument on the docker build command line avoids the need to modify the Dockerfile for each image build. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts/docker')
-rw-r--r--scripts/docker/mxe-build-container/Dockerfile11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/docker/mxe-build-container/Dockerfile b/scripts/docker/mxe-build-container/Dockerfile
index a85bfbd6c..653ceb57e 100644
--- a/scripts/docker/mxe-build-container/Dockerfile
+++ b/scripts/docker/mxe-build-container/Dockerfile
@@ -1,5 +1,10 @@
-From ubuntu:18.04
+# Build the image using the --build-arg option, e.g.:
+# docker build -t boret/myimage:0.1 --build-arg=mxe_sha=123ABC456 .
+#
+From ubuntu:18.04
+ARG mxe_sha=master
+ENV _ver=${mxe_sha}
RUN mkdir -p /win
ADD settings.mk /win
RUN apt-get update && apt-get upgrade -y
@@ -40,12 +45,12 @@ RUN apt-get install -y \
scons
RUN cd /win ; git clone git://github.com/mxe/mxe ; \
cd mxe ; \
- git checkout 9f6b9c6f58510bedfa0bf9f87de9a214abe6b653 ;
+ git checkout ${_ver} ;
RUN mv /win/settings.mk /win/mxe
RUN cd /win/mxe ; \
make -j 6 2>&1 | tee build.log ;
RUN cd /win/mxe ; \
- make MXE_TARGETS=i686-w64-mingw32.static glib -j 6 2>&1 |tee build.log ;
+ make MXE_TARGETS=i686-w64-mingw32.static glib -j 6 2>&1 | tee build.log ;
RUN cd /win/mxe ; \
mkdir -p neolit ; cd neolit ; git clone -b wip/win git://github.com/qt/qtconnectivity
RUN cd /win/mxe/neolit/qtconnectivity ; \