1 # Builds Beremiz windows installer |
1 # Dockerfile to setup beremiz_public_dist build container |
2 |
2 |
3 # initialize : |
3 FROM ubuntu:focal |
4 # docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) -t beremiz_builder . |
|
5 # |
|
6 # build installer in ~/build, fetch source from repo : |
|
7 # docker run -v ~/build/:/home/devel/build beremiz_builder |
|
8 # |
|
9 # build installer in ~/build, taking source from ~/src : |
|
10 # docker run -v ~/src:/home/devel/src -v ~/build/:/home/devel/build --rm beremiz_builder \ |
|
11 # xvfb-run make -C /home/devel/build -f /home/devel/src/LPC-2.MC9_distro/Makefile |
|
12 # |
|
13 # to use on code-build-test cycle : |
|
14 # docker create --name current -v ~/src:/home/devel/src -v ~/build/:/home/devel/build -i -t beremiz_builder /bin/bash |
|
15 # docker start -i current |
|
16 # # call build operations from here |
|
17 # docker stop current |
|
18 # docker rm current |
|
19 |
|
20 FROM ubuntu:xenial |
|
21 |
4 |
22 ENV TERM xterm-256color |
5 ENV TERM xterm-256color |
23 |
6 |
24 COPY provision_xenial64.sh . |
7 COPY provision_focal64.sh . |
25 |
8 |
26 RUN ./provision_xenial64.sh |
9 RUN ./provision_focal64.sh |
|
10 |
|
11 ENV LANG en_US.UTF-8 |
|
12 ENV LANGUAGE en_US:en |
|
13 ENV LC_ALL en_US.UTF-8 |
27 |
14 |
28 ARG UNAME=devel |
15 ARG UNAME=devel |
29 ENV UNAME ${UNAME} |
16 ENV UNAME ${UNAME} |
30 ARG UID=1000 |
17 ARG UID=1000 |
31 ARG GID=1000 |
18 ARG GID=1000 |
32 RUN groupadd -g $GID $UNAME |
19 RUN groupadd -g $GID $UNAME |
33 RUN useradd -m -u $UID -g $GID -s /bin/bash $UNAME |
20 RUN useradd -m -u $UID -g $GID -s /bin/bash $UNAME |
34 USER $UNAME |
21 USER $UNAME |
35 |
22 |
36 RUN mkdir /home/$UNAME/build /home/$UNAME/src |
23 RUN mkdir /home/$UNAME/build /home/$UNAME/src |
37 COPY . /home/$UNAME/src/beremiz_public_dist/ |
|
38 |
24 |
39 CMD xvfb-run make -C /home/$UNAME/build -f /home/$UNAME/src/beremiz_public_dist/Makefile |
25 # easy to remember 'build' alias to invoke main makefile |
40 |
26 ARG OWNDIRBASENAME=beremiz_public_dist |
|
27 ENV OWNDIRBASENAME ${OWNDIRBASENAME} |
|
28 RUN echo "alias build='make -C /home/"$UNAME"/build -f /home/devel/src/"$OWNDIRBASENAME"/Makefile'">/home/$UNAME/.bash_aliases |