Drthrax74

Dockerfile de base

May 31st, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #######################################################################################
  2. # #
  3. # FROM MAINTAINER RUN CMD EXPOSE ENV ARG COPY ADD LABEL ENTRYPOINT VOLUME #
  4. # #
  5. #######################################################################################
  6.  
  7. #####################################################################################
  8.  
  9. FROM scratch
  10. MAINTAINER Marc <teste74@hotmail.fr>
  11.  
  12. #System Alpine extrait a la racine
  13. ADD alpine-minirootfs-3.12.0-x86_64.tar.gz /
  14.  
  15. #Mot de passe du compte root
  16. RUN echo 'root:admin' | chpasswd
  17.  
  18. #####################################################################################
  19.  
  20. #Installation de paquet
  21. RUN apk --update add --no-cache net-tools
  22. RUN apk --update add --no-cache openssh bash
  23. RUN sed -i s/#PermitRootLogin.*/PermitRootLogin\ yes/ /etc/ssh/sshd_config
  24.  
  25.  
  26. #Purge du cache
  27. #RUN rm -rf /var/lib/apt/lists/*
  28. #RUN rm /var/cache/apk/*
  29.  
  30. EXPOSE 22
  31.  
  32. #CMD /bin/sh
  33. CMD ["/usr/sbin/sshd", "-D"]
Add Comment
Please, Sign In to add comment