Dockerfile
changeset 37 fd09116d3537
parent 32 bec145483ea8
child 41 77b38c4d0d7f
child 44 c460ec8c65e9
--- a/Dockerfile	Sun Dec 17 01:29:32 2017 +0100
+++ b/Dockerfile	Sat Sep 04 01:35:11 2021 +0200
@@ -1,29 +1,16 @@
-# Builds Beremiz windows installer
+# Dockerfile to setup beremiz_public_dist build container
 
-# initialize :
-#   docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) -t beremiz_builder .
-#
-# build installer in ~/build, fetch source from repo :
-#   docker run -v ~/build/:/home/devel/build beremiz_builder
-#
-# build installer in ~/build, taking source from ~/src :
-#   docker run -v ~/src:/home/devel/src -v ~/build/:/home/devel/build --rm beremiz_builder \
-#       xvfb-run make -C /home/devel/build -f /home/devel/src/LPC-2.MC9_distro/Makefile
-#
-# to use on code-build-test cycle :
-#   docker create --name current -v ~/src:/home/devel/src -v ~/build/:/home/devel/build -i -t beremiz_builder /bin/bash
-#   docker start -i current 
-#       # call build operations from here
-#   docker stop current
-#   docker rm current
-
-FROM ubuntu:xenial
+FROM ubuntu:focal
 
 ENV TERM xterm-256color
 
-COPY provision_xenial64.sh .
+COPY provision_focal64.sh .
 
-RUN ./provision_xenial64.sh
+RUN ./provision_focal64.sh
+
+ENV LANG en_US.UTF-8
+ENV LANGUAGE en_US:en
+ENV LC_ALL en_US.UTF-8
 
 ARG UNAME=devel
 ENV UNAME ${UNAME}
@@ -34,7 +21,8 @@
 USER $UNAME
 
 RUN mkdir /home/$UNAME/build /home/$UNAME/src
-COPY . /home/$UNAME/src/beremiz_public_dist/
 
-CMD xvfb-run make -C /home/$UNAME/build -f /home/$UNAME/src/beremiz_public_dist/Makefile
-
+# easy to remember 'build' alias to invoke main makefile
+ARG OWNDIRBASENAME=beremiz_public_dist
+ENV OWNDIRBASENAME ${OWNDIRBASENAME}
+RUN echo "alias build='make -C /home/"$UNAME"/build -f /home/devel/src/"$OWNDIRBASENAME"/Makefile'">/home/$UNAME/.bash_aliases