feat(docker): build files
This commit is contained in:
31
Dockerfile
Normal file
31
Dockerfile
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
|
# Avoid interactive prompts
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
build-essential automake libtool texinfo bison flex gawk \
|
||||||
|
g++ git xxd curl wget gdisk gperf cpio bc screen unzip \
|
||||||
|
libgmp-dev libmpfr-dev libmpc-dev libssl-dev libncurses-dev \
|
||||||
|
libglib2.0-dev libpixman-1-dev libyaml-dev patchutils python3-pip \
|
||||||
|
zlib1g-dev device-tree-compiler dosfstools mtools kpartx rsync \
|
||||||
|
sudo ca-certificates \
|
||||||
|
&& curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \
|
||||||
|
&& apt-get install -y git-lfs \
|
||||||
|
&& git lfs install \
|
||||||
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Create a non-root user
|
||||||
|
ARG USERNAME=developer
|
||||||
|
ARG USER_UID=1000
|
||||||
|
ARG USER_GID=$USER_UID
|
||||||
|
|
||||||
|
RUN groupadd --gid $USER_GID $USERNAME \
|
||||||
|
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
|
||||||
|
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
|
||||||
|
&& chmod 0440 /etc/sudoers.d/$USERNAME
|
||||||
|
|
||||||
|
USER $USERNAME
|
||||||
|
WORKDIR /home/developer/sdk
|
||||||
|
|
||||||
|
CMD ["/bin/bash"]
|
||||||
14
docker-compose.yml
Normal file
14
docker-compose.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
services:
|
||||||
|
fml13-builder:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
args:
|
||||||
|
USER_UID: ${UID:-1000}
|
||||||
|
USER_GID: ${GID:-1000}
|
||||||
|
image: fml13v01-sdk-env:latest
|
||||||
|
container_name: fml13_builder
|
||||||
|
volumes:
|
||||||
|
- .:/home/developer/sdk
|
||||||
|
privileged: true
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
14
instructions.md
Normal file
14
instructions.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
\# Instructions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$ docker compose up -d
|
||||||
|
|
||||||
|
$ docker exec -it fml13\_builder bash
|
||||||
|
|
||||||
|
$ git config --global --add safe.directory '\*'
|
||||||
|
|
||||||
|
$ git submodule update --init --recursive --depth 1 --progress
|
||||||
|
|
||||||
|
$ make -j$(nproc)
|
||||||
|
|
||||||
Reference in New Issue
Block a user