Fix file ownership in Dockerfiles

This commit is contained in:
William Robinet 2021-03-23 16:25:04 +01:00
parent f59f015055
commit d1114f145a
6 changed files with 13 additions and 7 deletions

View file

@ -12,16 +12,17 @@ RUN useradd -ms /bin/bash ssldump
RUN passwd -d ssldump RUN passwd -d ssldump
RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers
USER ssldump
RUN cd /home/ssldump && \ RUN cd /home/ssldump && \
git clone https://github.com/adulau/ssldump.git build git clone https://github.com/adulau/ssldump.git build
RUN cd /home/ssldump/build && \ RUN cd /home/ssldump/build && \
./autogen.sh && \ ./autogen.sh && \
./configure CC=/usr/bin/clang && \ ./configure CC=/usr/bin/clang CFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wformat -Werror=format-security -g" && \
make && \ make && \
sudo make install sudo make install
USER ssldump
WORKDIR "/home/ssldump" WORKDIR "/home/ssldump"
CMD ["/bin/bash"] CMD ["/bin/bash"]

View file

@ -12,6 +12,8 @@ RUN useradd -ms /bin/bash ssldump
RUN passwd -d ssldump RUN passwd -d ssldump
RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers
USER ssldump
RUN cd /home/ssldump && \ RUN cd /home/ssldump && \
git clone https://github.com/adulau/ssldump.git build git clone https://github.com/adulau/ssldump.git build
@ -21,7 +23,6 @@ RUN cd /home/ssldump/build && \
make && \ make && \
sudo make install sudo make install
USER ssldump
WORKDIR "/home/ssldump" WORKDIR "/home/ssldump"
CMD ["/bin/bash"] CMD ["/bin/bash"]

View file

@ -12,6 +12,8 @@ RUN useradd -ms /bin/bash ssldump
RUN passwd -d ssldump RUN passwd -d ssldump
RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers
USER ssldump
RUN cd /home/ssldump && \ RUN cd /home/ssldump && \
git clone https://github.com/adulau/ssldump.git build git clone https://github.com/adulau/ssldump.git build
@ -21,7 +23,6 @@ RUN cd /home/ssldump/build && \
make && \ make && \
sudo make install sudo make install
USER ssldump
WORKDIR "/home/ssldump" WORKDIR "/home/ssldump"
CMD ["/bin/bash"] CMD ["/bin/bash"]

View file

@ -12,6 +12,8 @@ RUN useradd -ms /bin/bash ssldump
RUN passwd -d ssldump RUN passwd -d ssldump
RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers
USER ssldump
RUN cd /home/ssldump && \ RUN cd /home/ssldump && \
git clone https://github.com/adulau/ssldump.git build git clone https://github.com/adulau/ssldump.git build
@ -21,7 +23,6 @@ RUN cd /home/ssldump/build && \
make && \ make && \
sudo make install sudo make install
USER ssldump
WORKDIR "/home/ssldump" WORKDIR "/home/ssldump"
CMD ["/bin/bash"] CMD ["/bin/bash"]

View file

@ -12,6 +12,8 @@ RUN useradd -ms /bin/bash ssldump
RUN passwd -d ssldump RUN passwd -d ssldump
RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers
USER ssldump
RUN cd /home/ssldump && \ RUN cd /home/ssldump && \
git clone https://github.com/adulau/ssldump.git build git clone https://github.com/adulau/ssldump.git build
@ -21,7 +23,6 @@ RUN cd /home/ssldump/build && \
make && \ make && \
sudo make install sudo make install
USER ssldump
WORKDIR "/home/ssldump" WORKDIR "/home/ssldump"
CMD ["/bin/bash"] CMD ["/bin/bash"]

View file

@ -12,6 +12,8 @@ RUN useradd -ms /bin/bash ssldump
RUN passwd -d ssldump RUN passwd -d ssldump
RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers RUN printf 'ssldump ALL=(ALL) ALL\n' | tee -a /etc/sudoers
USER ssldump
RUN cd /home/ssldump && \ RUN cd /home/ssldump && \
git clone https://github.com/adulau/ssldump.git build git clone https://github.com/adulau/ssldump.git build
@ -21,7 +23,6 @@ RUN cd /home/ssldump/build && \
make && \ make && \
sudo make install sudo make install
USER ssldump
WORKDIR "/home/ssldump" WORKDIR "/home/ssldump"
CMD ["/bin/bash"] CMD ["/bin/bash"]