Dockerfile
author Edouard Tisserant <edouard.tisserant@gmail.com>
Thu, 19 May 2022 18:21:12 +0200
changeset 45 20c1c8a59eab
parent 44 c460ec8c65e9
child 47 be6d0d610f84
permissions -rw-r--r--
Makefile: Allow overriding revisions IDs through environment, to make it possible to build code comming from non HG repos.
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 32
diff changeset
     1
# Dockerfile to setup beremiz_public_dist build container
22
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     2
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 32
diff changeset
     3
FROM ubuntu:focal
22
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     4
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     5
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
     6
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 32
diff changeset
     7
COPY provision_focal64.sh .
22
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
     8
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 32
diff changeset
     9
RUN ./provision_focal64.sh
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 32
diff changeset
    10
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 32
diff changeset
    11
ENV LANG en_US.UTF-8
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 32
diff changeset
    12
ENV LANGUAGE en_US:en
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 32
diff changeset
    13
ENV LC_ALL en_US.UTF-8
22
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    14
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    15
ARG UNAME=devel
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    16
ENV UNAME ${UNAME}
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    17
ARG UID=1000
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    18
ARG GID=1000
07ad3ba42d39 Experimental docker based installer build, + update of mingw binaries - builds, untested
Edouard Tisserant <edouard.tisserant@gmail.com>
parents:
diff changeset
    19
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
    20
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
    21
37
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 32
diff changeset
    22
# easy to remember 'build' alias to invoke main makefile
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 32
diff changeset
    23
ARG OWNDIRBASENAME=beremiz_public_dist
fd09116d3537 New windows installer cross build, using patched pacman to get MSYS2's packages and PIP over Wine to get PyPI packages. Work in progress.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 32
diff changeset
    24
ENV OWNDIRBASENAME ${OWNDIRBASENAME}
44
c460ec8c65e9 Don't require TTY for docker.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 37
diff changeset
    25
RUN echo -e '#!/bin/bash\nmake -f /home/'$UNAME'/src/'$OWNDIRBASENAME'/Makefile $*' > /usr/local/bin/build
c460ec8c65e9 Don't require TTY for docker.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 37
diff changeset
    26
RUN chmod +x /usr/local/bin/build
c460ec8c65e9 Don't require TTY for docker.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 37
diff changeset
    27
c460ec8c65e9 Don't require TTY for docker.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 37
diff changeset
    28
USER $UNAME
c460ec8c65e9 Don't require TTY for docker.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 37
diff changeset
    29
c460ec8c65e9 Don't require TTY for docker.
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 37
diff changeset
    30
RUN mkdir /home/$UNAME/build /home/$UNAME/src