File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Stage 1. Check out LLVM source code and run the build.
2- FROM debian:12 as builder
2+ FROM debian:12 AS builder
33# First, Update the apt's source list and include the sources of the packages.
44RUN grep deb /etc/apt/sources.list | \
55 sed 's/^deb/deb-src /g' >> /etc/apt/sources.list
@@ -21,6 +21,9 @@ RUN cmake --install /tmp/clang-source/build-llvm --prefix /tmp/clang-install
2121
2222# Stage 2. Produce a minimal release image with build results.
2323FROM debian:12
24+ ARG USER_NAME
25+ ARG USER_ID
26+ ARG GROUP_ID
2427LABEL maintainer "LLVM Developers"
2528# Install packages for minimal useful image.
2629RUN apt-get update && \
@@ -30,3 +33,10 @@ RUN apt-get update && \
3033COPY --from=builder /tmp/clang-install/ /usr/local/
3134RUN P=`/usr/local/bin/clang++ -v 2>&1 | grep Target | cut -d' ' -f2-`; echo /usr/local/lib/$P > /etc/ld.so.conf.d/$P.conf
3235RUN ldconfig
36+ RUN addgroup --gid $GROUP_ID user; exit 0
37+ RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID $USER_NAME; exit 0
38+ RUN echo "$USER_NAME:$USER_NAME" | chpasswd && adduser $USER_NAME sudo
39+ RUN echo '----->'
40+ RUN echo 'root:Docker!' | chpasswd
41+ ENV TERM xterm-256color
42+ USER $USER_NAME
You can’t perform that action at this time.
0 commit comments