-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.devel
58 lines (45 loc) · 1.18 KB
/
Dockerfile.devel
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
# Developer Image (zephyr-build)
ARG BASE_IMAGE
FROM ${BASE_IMAGE:-zephyrprojectrtos/ci:latest}
# Install packages
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get install --no-install-recommends -y \
openbox \
python3-xdg \
libpython3-dev \
x11vnc \
xvfb \
xterm \
xz-utils
# Clean up stale packages
RUN apt-get clean -y && \
apt-get autoremove --purge -y && \
rm -rf /var/lib/apt/lists/*
# Add entrypoint script
ADD ./entrypoint.sh /home/user/entrypoint.sh
RUN dos2unix /home/user/entrypoint.sh
ENTRYPOINT ["/home/user/entrypoint.sh"]
# Add bash completion script
ADD ./bash_completion /home/user/.bash_completion
RUN mkdir -p /home/user/.bash_completion.d
# Switch to 'user' context
USER user
# Configure environment variables
ENV DISPLAY=:0
ENV ZEPHYR_BASE=/workdir/zephyr
# Set working directory
WORKDIR /workdir
VOLUME ["/workdir"]
# Configure VNC authentication
ARG VNCPASSWD=zephyr
RUN mkdir ~/.vnc && x11vnc -storepasswd ${VNCPASSWD} ~/.vnc/passwd
# Expose port 5900 for VNC
EXPOSE 5900
# Adjust 'user' home directory permissions
USER root
RUN chown -R user:user /home/user
# Make 'user' default on launch
USER user
# Launch bash shell by default
CMD ["/bin/bash"]