File tree Expand file tree Collapse file tree 2 files changed +13
-35
lines changed Expand file tree Collapse file tree 2 files changed +13
-35
lines changed Original file line number Diff line number Diff line change @@ -36,30 +36,27 @@ ADD ./bash_completion /home/$USERNAME/.bash_completion
36
36
RUN mkdir -p /home/$USERNAME/.bash_completion.d
37
37
38
38
39
+ # Adjust $USERNAME home directory permissions
40
+ USER root
41
+ RUN chown -R $USERNAME:$USERNAME /home/$USERNAME
42
+
39
43
# Switch to 'user' context
40
44
USER $USERNAME
41
45
42
46
# Configure environment variables
43
- # ENV DISPLAY=:0
47
+ ENV DISPLAY=:0
44
48
ENV ZEPHYR_BASE=/workdir/zephyr
45
49
46
50
# Set working directory
47
51
WORKDIR /workdir
48
52
VOLUME ["/workdir"]
49
53
50
54
# Configure VNC authentication
51
- # ARG VNCPASSWD=zephyr
52
- # RUN mkdir ~/.vnc && x11vnc -storepasswd ${VNCPASSWD} ~/.vnc/passwd
55
+ ARG VNCPASSWD=zephyr
56
+ RUN mkdir ~/.vnc && x11vnc -storepasswd ${VNCPASSWD} ~/.vnc/passwd
53
57
54
58
# Expose port 5900 for VNC
55
- # EXPOSE 5900
56
-
57
- # Adjust $USERNAME home directory permissions
58
- USER root
59
- RUN chown -R $USERNAME:$USERNAME /home/$USERNAME
60
-
61
- # Make 'user' default on launch
62
- USER $USERNAME
59
+ EXPOSE 5900
63
60
64
61
# Launch bash shell by default
65
62
CMD ["/bin/bash"]
Original file line number Diff line number Diff line change 1
- #! /bin/dash
1
+ #! /bin/bash
2
2
3
- # SNUM=$(echo $DISPLAY | sed 's/:\([0-9][0-9]*\)/\1/')
4
- # xvfb-run -n $SNUM -s "-screen 0 1024x768x24" -f ~/.Xauthority openbox-session &
5
- # sleep 1
6
- # x11vnc -display $DISPLAY -usepw -forever -quiet &
3
+ SNUM=$( echo $DISPLAY | sed ' s/:\([0-9][0-9]*\)/\1/' )
4
+ xvfb-run -n $SNUM -s " -screen 0 1024x768x24" -f ~ /.Xauthority openbox-session &
5
+ sleep 1
6
+ x11vnc -display $DISPLAY -usepw -forever -quiet &
7
7
8
- sudo chown $( id -u) /workdir
9
- sudo chgrp $( id -g) /workdir
10
-
11
- # this assumes the usb dongle of interest is located on bus 0 and device 3
12
- # if not this should me modified to match (or can be run manually once the
13
- # container is started)
14
- if [ -c " /dev/bus/usb/001/003" ]; then
15
- echo " USB device detected at bus 001, device 003 Changing permissions"
16
- sudo chmod 0666 /dev/bus/usb/001/003
17
- fi
18
-
19
- # check to see if the STM32 Cube programmer is installed, and if it is
20
- # then append it to the PATH
21
- # can be downloaded from
22
- # https://www.st.com/en/development-tools/stm32cubeprog.html
23
- if [ -d " /home/$USER /st/stm32cubeclt_1.17.0/STM32CubeProgrammer" ]; then
24
- echo " Adding the STM32 Cube Programmer to the path"
25
- export PATH=$PATH :/home/$USER /st/stm32cubeclt_1.17.0/STM32CubeProgrammer/bin
26
- fi
27
8
28
9
exec " $@ "
You can’t perform that action at this time.
0 commit comments