-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
52 lines (39 loc) · 1.69 KB
/
Dockerfile
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
FROM ubuntu:jammy
ARG BKC_USER
ARG BKC_UID
ARG BKC_GID
USER root
# create a new user with same UID & PID but no password
RUN groupadd --gid ${BKC_GID} ${BKC_USER} && \
useradd --create-home ${BKC_USER} --uid=${BKC_UID} --gid=${BKC_GID} --groups root && \
passwd --delete ${BKC_USER}
# add user to the sudo group and set sudo group to no passoword
RUN apt update && \
apt install -y sudo && \
adduser ${BKC_USER} sudo && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# prevent tzdata to ask for configuration
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt -y install tzdata
RUN apt install -y build-essential git cmake
USER root
RUN apt -y update
# Optional upgrade just for upper version of Yocto
#RUN apt -y upgrade
RUN apt install -y \
gawk wget git diffstat locales \
unzip texinfo gcc build-essential \
chrpath socat cpio python3 python3-pip \
python3-pexpect xz-utils debianutils iputils-ping \
python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
pylint xterm python3-subunit mesa-common-dev zstd liblz4-tool file && \
locale-gen en_US.UTF-8
# setup default user when enter the container
USER ${BKC_UID}:${BKC_GID}
WORKDIR /home/${BKC_USER}
RUN cd /home/${BKC_USER} && \
rm -rf ./kas && \
git clone https://github.com/siemens/kas.git && \
cd ./kas
USER root
RUN cd /home/${BKC_USER}/kas && \
pip3 install .