This repository was archived by the owner on Mar 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,8 +76,8 @@ ARG MISC_DEPS="\
7676 whois"
7777
7878# Update the Apt cache and install basic tools
79- RUN pacman -Syu --noconfirm
80- RUN pacman -S --noconfirm \
79+ RUN pacman -Syu --noconfirm \
80+ && pacman -S --noconfirm \
8181 ${BASE_DEPS} \
8282 ${LIBPMEMOBJ_CPP_DEPS} \
8383 ${NDCTL_DEPS} \
@@ -86,7 +86,8 @@ RUN pacman -S --noconfirm \
8686 ${EXAMPLES_DEPS} \
8787 ${DOC_DEPS} \
8888 ${TESTS_DEPS} \
89- ${MISC_DEPS}
89+ ${MISC_DEPS} \
90+ && rm -rf /var/cache/pacman/pkg/*
9091
9192# Install libndctl
9293COPY install-libndctl.sh install-libndctl.sh
@@ -104,14 +105,11 @@ RUN ./install-pmdk.sh
104105ENV USER user
105106ENV USERPASS p1a2s3s4
106107ENV PFILE ./password
107- RUN useradd -m $USER
108- RUN echo $USERPASS > $PFILE
109- RUN echo $USERPASS >> $PFILE
110- RUN passwd $USER < $PFILE
111- RUN rm -f $PFILE
112- RUN sed -i 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' /etc/sudoers
113- RUN gpasswd wheel -a $USER
108+ RUN useradd -m $USER \
109+ && echo $USERPASS > $PFILE \
110+ && echo $USERPASS >> $PFILE \
111+ && passwd $USER < $PFILE \
112+ && rm -f $PFILE \
113+ && sed -i 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' /etc/sudoers \
114+ && gpasswd wheel -a $USER
114115USER $USER
115-
116- # Clean the cache of packages
117- RUN rm -rf /var/cache/pacman/pkg/*
Original file line number Diff line number Diff line change @@ -74,14 +74,12 @@ ARG MISC_DEPS="\
7474 pkgconf \
7575 sudo"
7676
77- # Update package repository and extend dnf's package base
78- RUN dnf update -y
79- RUN dnf install -y epel-release
80- RUN dnf install -y 'dnf-command(config-manager)'
81- RUN dnf config-manager --set-enabled powertools
82-
83- # Install basic tools
77+ # Update package repository, extend dnf's package base and install basic tools
8478RUN dnf update -y \
79+ && dnf install -y epel-release \
80+ && dnf install -y 'dnf-command(config-manager)' \
81+ && dnf config-manager --set-enabled powertools \
82+ && dnf update -y \
8583 && dnf install -y \
8684 ${BASE_DEPS} \
8785 ${LIBPMEMOBJ_CPP_DEPS} \
@@ -104,7 +102,7 @@ RUN ./install-pmdk.sh rpm
104102# Add user
105103ENV USER user
106104ENV USERPASS pass
107- RUN useradd -m $USER
108- RUN echo $USERPASS | passwd $USER --stdin
109- RUN gpasswd wheel -a $USER
105+ RUN useradd -m $USER \
106+ && echo $USERPASS | passwd $USER --stdin \
107+ && gpasswd wheel -a $USER
110108USER $USER
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ RUN ./install-pmdk.sh rpm
9999# Add user
100100ENV USER user
101101ENV USERPASS pass
102- RUN useradd -m $USER
103- RUN echo "$USER:$USERPASS" | chpasswd
104- RUN gpasswd wheel -a $USER
102+ RUN useradd -m $USER \
103+ && echo "$USER:$USERPASS" | chpasswd \
104+ && gpasswd wheel -a $USER
105105USER $USER
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ RUN ./install-pmdk.sh rpm
9898# Add user
9999ENV USER user
100100ENV USERPASS pass
101- RUN useradd -m $USER
102- RUN echo "$USER:$USERPASS" | chpasswd
103- RUN gpasswd wheel -a $USER
101+ RUN useradd -m $USER \
102+ && echo "$USER:$USERPASS" | chpasswd \
103+ && gpasswd wheel -a $USER
104104USER $USER
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ RUN dnf update -y \
6969# Add user
7070ENV USER user
7171ENV USERPASS pass
72- RUN useradd -m $USER
73- RUN echo "$USER:$USERPASS" | chpasswd
74- RUN gpasswd wheel -a $USER
72+ RUN useradd -m $USER \
73+ && echo "$USER:$USERPASS" | chpasswd \
74+ && gpasswd wheel -a $USER
7575USER $USER
Original file line number Diff line number Diff line change @@ -71,27 +71,21 @@ ARG MISC_DEPS="\
7171 pkg-config \
7272 sudo"
7373
74- # Update the OS
75- RUN zypper dup -y
76-
77- # Update all packages
78- RUN zypper update -y
79-
80- # Install basic tools
81- RUN zypper install -y \
74+ # Update the OS, packages and install basic tools
75+ RUN zypper dup -y \
76+ && zypper update -y \
77+ && zypper install -y \
8278 ${BASE_DEPS} \
8379 ${LIBPMEMOBJ_CPP_DEPS} \
8480 ${PMDK_DEPS} \
8581 ${VALGRIND_DEPS} \
8682 ${EXAMPLES_DEPS} \
8783 ${DOC_DEPS} \
8884 ${TESTS_DEPS} \
89- ${MISC_DEPS}
90-
91- # Clean the package cache
92- RUN zypper clean all
85+ ${MISC_DEPS} \
86+ && zypper clean all
9387
94- # Install valgrind
88+ # Install valgrind and update pkg-config path variable
9589COPY install-valgrind.sh install-valgrind.sh
9690RUN ./install-valgrind.sh
9791ENV PKG_CONFIG_PATH $PKG_CONFIG_PATH:/usr/lib/pkgconfig/
@@ -104,12 +98,12 @@ RUN ./install-pmdk.sh rpm
10498ENV USER user
10599ENV USERPASS p1a2s3s4
106100ENV PFILE ./password
107- RUN useradd -m $USER
108- RUN echo $USERPASS > $PFILE
109- RUN echo $USERPASS >> $PFILE
110- RUN passwd $USER < $PFILE
111- RUN rm -f $PFILE
112- RUN sed -i 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' /etc/sudoers
113- RUN groupadd wheel
114- RUN gpasswd wheel -a $USER
101+ RUN useradd -m $USER \
102+ && echo $USERPASS > $PFILE \
103+ && echo $USERPASS >> $PFILE \
104+ && passwd $USER < $PFILE \
105+ && rm -f $PFILE \
106+ && sed -i 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' /etc/sudoers \
107+ && groupadd wheel \
108+ && gpasswd wheel -a $USER
115109USER $USER
Original file line number Diff line number Diff line change @@ -71,25 +71,19 @@ ARG MISC_DEPS="\
7171 pkg-config \
7272 sudo"
7373
74- # Update the OS
75- RUN zypper dup -y
76-
77- # Update all packages
78- RUN zypper update -y
79-
80- # Install basic tools
81- RUN zypper install -y \
74+ # Update the OS, packages and install basic tools
75+ RUN zypper dup -y \
76+ && zypper update -y \
77+ && zypper install -y \
8278 ${BASE_DEPS} \
8379 ${LIBPMEMOBJ_CPP_DEPS} \
8480 ${PMDK_DEPS} \
8581 ${VALGRIND_DEPS} \
8682 ${EXAMPLES_DEPS} \
8783 ${DOC_DEPS} \
8884 ${TESTS_DEPS} \
89- ${MISC_DEPS}
90-
91- # Clean the package cache
92- RUN zypper clean all
85+ ${MISC_DEPS} \
86+ && zypper clean all
9387
9488# Install valgrind
9589COPY install-valgrind.sh install-valgrind.sh
@@ -104,12 +98,12 @@ RUN ./install-pmdk.sh rpm
10498ENV USER user
10599ENV USERPASS p1a2s3s4
106100ENV PFILE ./password
107- RUN useradd -m $USER
108- RUN echo $USERPASS > $PFILE
109- RUN echo $USERPASS >> $PFILE
110- RUN passwd $USER < $PFILE
111- RUN rm -f $PFILE
112- RUN sed -i 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' /etc/sudoers
113- RUN groupadd wheel
114- RUN gpasswd wheel -a $USER
101+ RUN useradd -m $USER \
102+ && echo $USERPASS > $PFILE \
103+ && echo $USERPASS >> $PFILE \
104+ && passwd $USER < $PFILE \
105+ && rm -f $PFILE \
106+ && sed -i 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' /etc/sudoers \
107+ && groupadd wheel \
108+ && gpasswd wheel -a $USER
115109USER $USER
You can’t perform that action at this time.
0 commit comments