2020-06-13 09:57:02 +01:00
|
|
|
|
FROM debian:buster-20200514-slim
|
|
|
|
|
|
|
|
|
|
LABEL \
|
|
|
|
|
maintainer="Michel Stempin <michel.stempin@funkey-project.com>" \
|
|
|
|
|
vendor="FunKey Project" \
|
|
|
|
|
description="Container with everything needed to build FunKey-OS"
|
|
|
|
|
|
|
|
|
|
# Setup environment
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
|
|
|
|
|
|
RUN \
|
|
|
|
|
# Install dependencies
|
|
|
|
|
# See https://buildroot.org/downloads/manual/manual.html#requirement
|
|
|
|
|
apt-get update && \
|
|
|
|
|
apt-get install -y -q --no-install-recommends \
|
|
|
|
|
# MANDATORY build tools
|
|
|
|
|
#which \
|
|
|
|
|
#sed \
|
|
|
|
|
make \
|
|
|
|
|
binutils \
|
|
|
|
|
build-essential \
|
|
|
|
|
gcc \
|
|
|
|
|
g++ \
|
|
|
|
|
#bash \
|
|
|
|
|
patch \
|
|
|
|
|
#gzip \
|
|
|
|
|
bzip2 \
|
|
|
|
|
perl \
|
|
|
|
|
#tar \
|
|
|
|
|
cpio \
|
|
|
|
|
unzip \
|
|
|
|
|
rsync \
|
|
|
|
|
file \
|
|
|
|
|
bc \
|
|
|
|
|
# MANDATORY source fetching tools
|
|
|
|
|
wget \
|
|
|
|
|
# OPTIONAL recommended dependencies
|
|
|
|
|
python \
|
2020-11-18 22:06:43 +00:00
|
|
|
|
python-dev \
|
|
|
|
|
xxd \
|
2020-06-13 09:57:02 +01:00
|
|
|
|
# OPTIONAL configuration interface dependencies
|
|
|
|
|
libncurses5-dev \
|
|
|
|
|
#libqt5-dev \
|
|
|
|
|
#libglib2.0-dev libgtk2.0-dev libglade2-dev \
|
|
|
|
|
# OPTIONAL source fetching tools
|
|
|
|
|
#bazaar \
|
|
|
|
|
# bzr \
|
|
|
|
|
cvs \
|
|
|
|
|
git \
|
|
|
|
|
mercurial \
|
|
|
|
|
rsync \
|
|
|
|
|
liblscp-dev \
|
|
|
|
|
subversion \
|
|
|
|
|
# OPTIONAL java related packages
|
|
|
|
|
#javacc \
|
|
|
|
|
#jarwrapper \
|
|
|
|
|
# OPTIONAL documentation generation tools
|
|
|
|
|
#asciidoc \
|
|
|
|
|
#w3m \
|
2020-11-18 22:06:43 +00:00
|
|
|
|
python3 \
|
|
|
|
|
python3-dev \
|
|
|
|
|
python3-distutils \
|
|
|
|
|
python3-setuptools \
|
2020-06-13 09:57:02 +01:00
|
|
|
|
#dblatex \
|
|
|
|
|
# OPTIONAL graph generation tools
|
|
|
|
|
#graphviz \
|
|
|
|
|
#python-matplotlib \
|
|
|
|
|
#
|
|
|
|
|
# ADDITIONAL dependency to get root certificates
|
|
|
|
|
ca-certificates \
|
|
|
|
|
# ADDITIONAL dependency to get client ssh
|
|
|
|
|
openssh-client \
|
|
|
|
|
# ADDITIONAL dependency to get unbuffer
|
|
|
|
|
expect \
|
|
|
|
|
# ADDITIONAL dependency to get locale-gen
|
|
|
|
|
locales \
|
|
|
|
|
# ADDITIONAL nice to have dependencies
|
|
|
|
|
sudo \
|
|
|
|
|
procps \
|
|
|
|
|
&& \
|
|
|
|
|
apt-get -y autoremove && \
|
|
|
|
|
apt-get -y clean && \
|
|
|
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
|
|
|
#
|
|
|
|
|
# Set locale
|
|
|
|
|
sed -i 's/# \(en_US.UTF-8\)/\1/' /etc/locale.gen && \
|
|
|
|
|
locale-gen --purge --lang en_US.UTF-8 && \
|
|
|
|
|
#
|
|
|
|
|
# Add user
|
|
|
|
|
useradd -ms /bin/bash funkey && \
|
|
|
|
|
usermod -a -G sudo funkey && \
|
|
|
|
|
echo "funkey:funkey" | chpasswd && \
|
|
|
|
|
#
|
2020-11-19 16:15:25 +00:00
|
|
|
|
# Clone the FunKey-OS repository
|
|
|
|
|
git config --global url."https://91133a45ba476b7fc73c7b190dc597fa8f9c909d:@github.com/".insteadOf "https://github.com/" && \
|
|
|
|
|
git clone https://github.com/Michel-FK/FunKey-OS.git /home/funkey/FunKey-OS && \
|
2020-06-13 09:57:02 +01:00
|
|
|
|
#
|
|
|
|
|
# Set file ownership
|
|
|
|
|
chown -R funkey:funkey /home/funkey
|
|
|
|
|
|
|
|
|
|
# Set user
|
|
|
|
|
USER funkey
|
|
|
|
|
|
2020-11-19 16:15:25 +00:00
|
|
|
|
# Set working directory
|
|
|
|
|
WORKDIR /home/funkey/FunKey-OS
|
|
|
|
|
|
2020-06-13 09:57:02 +01:00
|
|
|
|
# Set environment
|
|
|
|
|
ENV \
|
|
|
|
|
HOME=/home/funkey \
|
2020-11-19 16:15:25 +00:00
|
|
|
|
LC_ALL=en_US.UTF-8
|
2020-06-13 09:57:02 +01:00
|
|
|
|
|
|
|
|
|
# VOLUME ["/home/funkey/.buildroot-ccache", \
|
|
|
|
|
# "/home/funkey/FunKey-OS/buildroot", \
|
2020-11-19 16:15:25 +00:00
|
|
|
|
# "/home/funkey/FunKey-OS/dowload", \
|
|
|
|
|
# "/home/funkey/FunKey-OS/images", \
|
|
|
|
|
# "/home/funkey/FunKey-OS/Recovery/output/build", \
|
|
|
|
|
# "/home/funkey/FunKey-OS/Recovery/output/host", \
|
|
|
|
|
# "/home/funkey/FunKey-OS/Recovery/output/target", \
|
2020-06-13 09:57:02 +01:00
|
|
|
|
# "/home/funkey/FunKey-OS/FunKey/output/host", \
|
2020-11-19 16:15:25 +00:00
|
|
|
|
# "/home/funkey/FunKey-OS/FunKey/output/build", \
|
2020-06-13 09:57:02 +01:00
|
|
|
|
# "/home/funkey/FunKey-OS/FunKey/output/target"]
|
|
|
|
|
|
2020-11-19 16:15:25 +00:00
|
|
|
|
CMD ["/usr/bin/make", "-C", "/home/funkey/FunKey-OS"]
|