Dockerfile
author Edouard Tisserant <edouard.tisserant@gmail.com>
Sat, 16 Dec 2017 17:28:22 +0100
changeset 33 12390414aed0
parent 32 bec145483ea8
child 37 fd09116d3537
permissions -rw-r--r--
added helper scripts to use docker build
22
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     1
# Builds Beremiz windows installer
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     2
28
950f79385de7 HGROOT now default to parent of directory containing makefile. Added more instruction in Dockerfile
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 22
diff changeset
     3
# initialize :
22
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     4
#   docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) -t beremiz_builder .
28
950f79385de7 HGROOT now default to parent of directory containing makefile. Added more instruction in Dockerfile
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 22
diff changeset
     5
#
32
bec145483ea8 docmumentation update
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 28
diff changeset
     6
# build installer in ~/build, fetch source from repo :
bec145483ea8 docmumentation update
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 28
diff changeset
     7
#   docker run -v ~/build/:/home/devel/build beremiz_builder
bec145483ea8 docmumentation update
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 28
diff changeset
     8
#
bec145483ea8 docmumentation update
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 28
diff changeset
     9
# build installer in ~/build, taking source from ~/src :
bec145483ea8 docmumentation update
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 28
diff changeset
    10
#   docker run -v ~/src:/home/devel/src -v ~/build/:/home/devel/build --rm beremiz_builder \
bec145483ea8 docmumentation update
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 28
diff changeset
    11
#       xvfb-run make -C /home/devel/build -f /home/devel/src/LPC-2.MC9_distro/Makefile
28
950f79385de7 HGROOT now default to parent of directory containing makefile. Added more instruction in Dockerfile
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 22
diff changeset
    12
#
950f79385de7 HGROOT now default to parent of directory containing makefile. Added more instruction in Dockerfile
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 22
diff changeset
    13
# to use on code-build-test cycle :
950f79385de7 HGROOT now default to parent of directory containing makefile. Added more instruction in Dockerfile
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 22
diff changeset
    14
#   docker create --name current -v ~/src:/home/devel/src -v ~/build/:/home/devel/build -i -t beremiz_builder /bin/bash
950f79385de7 HGROOT now default to parent of directory containing makefile. Added more instruction in Dockerfile
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 22
diff changeset
    15
#   docker start -i current 
950f79385de7 HGROOT now default to parent of directory containing makefile. Added more instruction in Dockerfile
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 22
diff changeset
    16
#       # call build operations from here
950f79385de7 HGROOT now default to parent of directory containing makefile. Added more instruction in Dockerfile
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 22
diff changeset
    17
#   docker stop current
950f79385de7 HGROOT now default to parent of directory containing makefile. Added more instruction in Dockerfile
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 22
diff changeset
    18
#   docker rm current
22
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    19
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    20
FROM ubuntu:xenial
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    21
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    22
ENV TERM xterm-256color
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    23
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    24
COPY provision_xenial64.sh .
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    25
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    26
RUN ./provision_xenial64.sh
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    27
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    28
ARG UNAME=devel
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    29
ENV UNAME ${UNAME}
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    30
ARG UID=1000
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    31
ARG GID=1000
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    32
RUN groupadd -g $GID $UNAME
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    33
RUN useradd -m -u $UID -g $GID -s /bin/bash $UNAME
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    34
USER $UNAME
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    35
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    36
RUN mkdir /home/$UNAME/build /home/$UNAME/src
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    37
COPY . /home/$UNAME/src/beremiz_public_dist/
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    38
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    39
CMD xvfb-run make -C /home/$UNAME/build -f /home/$UNAME/src/beremiz_public_dist/Makefile
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    40