-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.qemu
More file actions
45 lines (37 loc) · 1003 Bytes
/
Copy pathDockerfile.qemu
File metadata and controls
45 lines (37 loc) · 1003 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
FROM multiarch/qemu-user-static:x86_64-aarch64 as qemu
FROM arm64v8/debian:bullseye-slim
# Copy QEMU binary
COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/
# Continue with same setup as main Dockerfile
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
gcc \
g++ \
make \
curl \
wget \
pkg-config \
python3 \
python3-pip \
gdb \
valgrind \
vim \
&& rm -rf /var/lib/apt/lists/*
# Set up non-root user (optional but recommended)
ARG USERNAME=dev
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
&& apt-get update \
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME
# Set the default user
USER $USERNAME
# Set working directory
WORKDIR /workspace
# Command to run when container starts
CMD ["/bin/bash"]