-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (43 loc) · 1004 Bytes
/
Dockerfile
File metadata and controls
50 lines (43 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM debian:bookworm-slim
ARG USERNAME=buildroot
ARG UID=1000
ARG GID=1000
ENV LANG=C.UTF-8
RUN apt-get update && \
apt-get install -y --no-install-recommends \
file \
wget \
cpio \
rsync \
python3 \
python3-setuptools \
git \
unzip \
bc \
vim \
libssl-dev \
libncurses-dev \
build-essential \
bash \
perl \
ca-certificates \
python-is-python3 \
libfl-dev \
wireless-regdb \
device-tree-compiler \
cmake \
ninja-build \
sudo && \
# Create user and group to not use root
groupadd --gid ${GID} ${USERNAME} && \
useradd --uid ${UID} --gid ${GID} -m ${USERNAME} && \
echo "${USERNAME} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/${USERNAME} && \
chmod 0440 /etc/sudoers.d/${USERNAME} && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean && \
apt-get autoremove -y
USER ${USERNAME}
WORKDIR /app
ENV SHELL=/bin/bash
COPY build-image.sh /build-image.sh
ENTRYPOINT ["/build-image.sh"]