-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile.kirkstone
80 lines (72 loc) · 1.58 KB
/
Dockerfile.kirkstone
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
## Docker file to build a container that compiles
## new linux distros using Yocto
# Yocto Project Kirkstone
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
# Install necessary packages (Yocto documentation)
RUN apt-get update && \
apt-get install --no-install-recommends -y \
gawk \
wget \
git \
diffstat \
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 \
pylint3 \
xterm \
python3-subunit \
mesa-common-dev \
zstd \
liblz4-tool \
\
curl \
dialog \
file \
libncurses-dev \
locales \
ripgrep \
ssh \
sudo \
tmux \
tree \
vim \
&& rm -rf /var/lib/apt/lists/*
# Set locale and language
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Set user
ENV USER_NAME kirkstone
ARG host_uid=1000
ARG host_gid=1000
RUN groupadd -g $host_gid $USER_NAME && useradd -g $host_gid -m -s /bin/bash -u $host_uid $USER_NAME
RUN echo 'kirkstone:linux' | chpasswd
RUN adduser $USER_NAME sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# Create work folder
ENV BUILD_DIR /home/${USER_NAME}
RUN mkdir -p $BUILD_DIR
WORKDIR $BUILD_DIR
# Copy settings
COPY tmux.conf ${BUILD_DIR}/.tmux.conf
COPY vimrc ${BUILD_DIR}/.vimrc
COPY entrypoint.sh ${BUILD_DIR}/entrypoint.sh
RUN chmod +x ${BUILD_DIR}/entrypoint.sh
USER $USER_NAME
CMD ["./entrypoint.sh"]