Skip to content

Commit 3a60796

Browse files
committed
config/docker: clean up cros-sdk Dockerfile
Clean up the Dockerfile for the cros-sdk image: * sort package names alphabetically * split long lines and long commands * fix indentation issue with mixed tabs and spaces * rename "user" to "cros" user Signed-off-by: Guillaume Tucker <[email protected]>
1 parent 73eb4ce commit 3a60796

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

config/docker/cros-sdk/Dockerfile

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,36 @@ MAINTAINER "KernelCI TSC" <[email protected]>
55
RUN apt-get update \
66
&& apt-get upgrade -y \
77
&& apt-get install -y --no-install-recommends \
8-
sudo \
8+
build-essential \
99
ca-certificates \
10+
curl \
11+
git \
1012
netbase \
11-
git \
12-
build-essential \
13-
python3 \
14-
curl \
15-
wget \
16-
ssh \
17-
&& apt-get clean \
13+
python3 \
14+
sudo \
15+
ssh \
16+
wget
17+
18+
RUN apt-get clean \
1819
&& apt-get autoremove \
1920
&& rm -rf /var/lib/apt/lists/*
2021

21-
RUN useradd -u 996 -ms /bin/sh user && adduser user sudo && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
22-
RUN mkdir -p /home/user/chromiumos && chown -R user /home/user/chromiumos
22+
RUN useradd -u 996 -ms /bin/sh cros
23+
RUN adduser cros sudo && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
24+
RUN mkdir -p /home/cros/chromiumos
25+
RUN chown -R cros /home/cros/chromiumos
2326

2427
# Extra packages needed by kernelCI
2528
RUN apt-get update && apt-get install --no-install-recommends -y \
2629
python3.9 \
2730
python3-requests \
2831
python3-yaml
2932

30-
USER user
31-
ENV HOME=/home/user
33+
USER cros
34+
ENV HOME=/home/cros
3235
WORKDIR $HOME/chromiumos
3336

3437
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
35-
ENV PATH="/home/user/chromiumos/depot_tools:${PATH}"
38+
ENV PATH="/home/cros/chromiumos/depot_tools:${PATH}"
3639

3740
WORKDIR /kernelci-core

0 commit comments

Comments
 (0)