-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path18.dockerfile
More file actions
40 lines (34 loc) · 1.11 KB
/
18.dockerfile
File metadata and controls
40 lines (34 loc) · 1.11 KB
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
FROM ubuntu:18.04
RUN apt update \
&& apt install -y \
build-essential \
autotools-dev \
autoconf \
cmake \
ninja-build \
git \
gdb \
gawk \
flex \
bison \
xxd \
iproute2 \
zlib1g-dev \
qemu-system-i386 \
qemu-system-x86 \
gcc-multilib \
sudo \
&& rm -rf /var/cache/apt/archives /var/lib/apt/lists/*
ARG USERNAME=ubuntu
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure sudo \
&& groupadd $USERNAME \
&& useradd -u $USER_UID $USERNAME -g $USERNAME \
&& mkdir /home/$USERNAME \
&& chown -R $USER_UID:$USER_GID /home/$USERNAME \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME
USER $USERNAME
WORKDIR /home/$USERNAME
CMD ["/bin/bash"]