Skip to content

Commit

Permalink
GH-14: docker: Build into container using helper.mk
Browse files Browse the repository at this point in the history
To ensure reproductibility on host or cloud

Bug-SiliconLabs: UIC-3082
Bug-GitHub: rzr#3
Forwarded: #14
Signed-off-by: Philippe Coval <philippe.coval@silabs.com>
  • Loading branch information
rzr authored and agarwal57 committed Nov 28, 2023
1 parent 703a326 commit 711bd31
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM debian:bullseye

ENV DEBIAN_FRONTEND noninteractive
ENV LC_ALL en_US.UTF-8
ENV LANG ${LC_ALL}

RUN echo "# log: Configuring locales" \
&& set -x \
&& apt-get update -y \
&& apt-get install -y locales \
&& echo "${LC_ALL} UTF-8" | tee /etc/locale.gen \
&& locale-gen ${LC_ALL} \
&& dpkg-reconfigure locales \
&& TZ=Etc/UTC apt-get -y install tzdata \
&& date -u

ENV project unifysdk
ENV workdir /usr/local/opt/${project}
ADD . ${workdir}

WORKDIR ${workdir}

RUN echo "# log: Setup system" \
&& set -x \
&& apt-get install -y make sudo \
&& ./helper.mk help setup \
&& date -u

RUN echo "# log: Build" \
&& set -x \
&& ./helper.mk \
&& date -u

ENTRYPOINT [ "/usr/local/opt/unifysdk/helper.mk" ]
CMD [ "help" ]

0 comments on commit 711bd31

Please sign in to comment.