Skip to content

Commit 2a8cb18

Browse files
committed
devel: Use heredoc for multi-line RUN
As of Docker version 23.0, BuildKit is the default builder and the heredoc syntax is therefore supported. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
1 parent 356b0e8 commit 2a8cb18

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

Dockerfile.devel

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,27 @@ FROM ${BASE_IMAGE:-zephyrprojectrtos/ci:latest}
66
ARG USERNAME=user
77

88
# Install packages
9-
RUN apt-get -y update && \
10-
apt-get -y upgrade && \
9+
RUN <<EOF
10+
apt-get -y update
11+
apt-get -y upgrade
1112
apt-get install --no-install-recommends -y \
12-
openbox \
13-
python3-xdg \
14-
libpython3-dev \
15-
x11vnc \
16-
xvfb \
17-
xterm \
18-
xz-utils \
19-
usbutils \
20-
vim
13+
openbox \
14+
python3-xdg \
15+
libpython3-dev \
16+
x11vnc \
17+
xvfb \
18+
xterm \
19+
xz-utils \
20+
usbutils \
21+
vim
22+
EOF
2123

2224
# Clean up stale packages
23-
RUN apt-get clean -y && \
24-
apt-get autoremove --purge -y && \
25+
RUN <<EOF
26+
apt-get clean -y
27+
apt-get autoremove --purge -y
2528
rm -rf /var/lib/apt/lists/*
29+
EOF
2630

2731
# Add entrypoint script (it is in home because
2832
# I can't figure out how to get the $USERNAME
@@ -53,7 +57,10 @@ VOLUME ["/workdir"]
5357

5458
# Configure VNC authentication
5559
ARG VNCPASSWD=zephyr
56-
RUN mkdir ~/.vnc && x11vnc -storepasswd ${VNCPASSWD} ~/.vnc/passwd
60+
RUN <<EOF
61+
mkdir ~/.vnc
62+
x11vnc -storepasswd ${VNCPASSWD} ~/.vnc/passwd
63+
EOF
5764

5865
# Expose port 5900 for VNC
5966
EXPOSE 5900

0 commit comments

Comments
 (0)