-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (46 loc) · 1.85 KB
/
Copy pathDockerfile
File metadata and controls
57 lines (46 loc) · 1.85 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FROM ubuntu:22.04
ARG HOME=/home/user
ARG USER=maria
ARG GROUP=maria
ARG ARG_UID=1000
ARG ARG_GID=1000
ARG DEBIAN_FRONTEND=noninteractive
ENV UID=${ARG_UID}
ENV GID=${ARG_GID}
ENV LANG=en_US.UTF-8
RUN apt-get update && apt-get install -y gawk wget git-core diffstat unzip \
texinfo gcc-multilib build-essential chrpath socat cpio python3 \
python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping \
python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev xterm locales \
libgmp-dev libmpc-dev libsdl1.2-dev libssl-dev lz4 pylint \
vim bash-completion screen zstd iproute2 iptables sudo \
bridge-utils cpu-checker libvirt-clients libvirt-daemon qemu qemu-kvm \
nano libncurses-dev curl && rm -rf /var/lib/apt/lists/*
# needed by bitbake
RUN locale-gen en_US.UTF-8
# make user sudo command password-less
RUN echo "${USER} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/${USER} && \
chmod 0440 /etc/sudoers.d/${USER}
# Create a group and user
#--disabled-password prevents prompt for a password
#--gecos "" circumvents the prompt for "Full Name" etc. on Debian-based systems
#--home "$(pwd)" sets the user's home to the WORKDIR. You may not want this.
#--no-create-home prevents cruft getting copied into the directory from /etc/skel
RUN addgroup --gid ${GID} ${GROUP}
#RUN adduser \
# --disabled-password \
# --gecos "" \
# --home "${HOME}" \
# --ingroup "${GROUP}" \
# --uid "${UID}" \
# "${USER}"
RUN useradd -r -l -u ${UID} -g ${GID} -m -d ${HOME} ${USER}
# Tell docker that all future commands should run as the appuser user
RUN chown -R ${UID}:${GID} ${HOME}
USER maria
# Create home endpoint
RUN mkdir -p ${HOME}/work
WORKDIR ${HOME}/work
# needed by some recipes
RUN git config --global user.email "maria@marialinux.com"
RUN git config --global user.name "maria User"