瀏覽代碼

Set the root and user passwords to password in the Dockerfiles

elisabeth 2 年之前
父節點
當前提交
d05d6cc654
共有 2 個文件被更改,包括 5 次插入3 次删除
  1. 3 2
      dockerfiles/debian_large
  2. 2 1
      dockerfiles/debian_mini

+ 3 - 2
dockerfiles/debian_large

@@ -12,7 +12,8 @@ RUN apt-get update && apt-get -y upgrade && \
 	xxd iptables isc-dhcp-client isc-dhcp-common kmod less netcat-openbsd
 
 # Make a user, then copy over the /example directory
-RUN useradd -m user
+RUN useradd -m user && echo "user:password" | chpasswd
 COPY --chown=user:user ./examples /home/user/examples
 RUN chmod -R +x  /home/user/examples/lua
-CMD [ "/bin/bash" ]
+RUN echo 'root:password' | chpasswd
+CMD [ "/bin/bash" ]

+ 2 - 1
dockerfiles/debian_mini

@@ -7,7 +7,8 @@ RUN apt-get -y install apt-utils gcc \
 	patch wamerican ucf manpages \
 	file luajit make lua50 dialog curl \
 	less cowsay netcat-openbsd
-RUN useradd -m user
+RUN useradd -m user && echo "user:password" | chpasswd
 COPY --chown=user:user ./examples /home/user/examples
 RUN chmod -R +x  /home/user/examples/lua
+RUN echo 'root:password' | chpasswd
 CMD [ "/bin/bash" ]