From aab658fc9f787bec5461b8202b112e71cb868cf3 Mon Sep 17 00:00:00 2001 From: Salvador Cuñat Date: Tue, 29 Jan 2019 22:58:21 +0100 Subject: docker-mxe: Make Dockerfile reusable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Dirk Hohndel --- scripts/docker/mxe-build-container/Dockerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'scripts/docker/mxe-build-container/Dockerfile') 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 ; \ -- cgit v1.2.3-70-g09d2